00:01
Hello students, so the example of mysum function definition in python version 3 along with some test cases to identify the potential error.
00:12
So the code for that would be we are writing the code in python.
00:18
So first we will use the function that is def mysum passing numbers after that first the initial result would be 0 then for num in numbers and result is equal to num plus result or we can also write as result plus equal to num then returning the result return result.
00:59
Since i am writing the code so it might be some indentation means i am leaving some space so you can fix it in your editor that is visual studio code or any other compiler that is godv.
01:14
So for the test cases the first would be test underscore case underscore one which is empty test cases for test underscore case underscore two it would be one two three four five for test underscore case underscore three it would be zero minus one two and minus three and for test underscore case underscore four it would be ten twenty thirty and forty and fifty also.
02:06
Now for print mysum as would be capital in python capital letters and small letters would make a difference in the providing you the error.
02:19
So be very careful test underscore case passing the test underscore case and that for this the expected expected amount would be zero because it is an empty case for print mysum it would be test underscore case underscore one.
02:48
So for this the expected output would be so i am not writing expected just i am writing output because all output would be expected.
02:56
So it would be 15 for this...