Question: sum=1+1/2+1/3+1/4++1 The program includes two functions in parts a) and b) below: [11 marks] (a) The function main (): [5 Marks] accept no input parameter

 sum=1+1/2+1/3+1/4++1 The program includes two functions in parts a) and b)

sum=1+1/2+1/3+1/4++1 The program includes two functions in parts a) and b) below: [11 marks] (a) The function main (): [5 Marks] accept no input parameter and without return value ask user to input an end value (e.g. n=100) and store it in a variable named: n display the input end value on screen properly call the sumH () with the input data as argument Call the main () function for starting execution (b) The function sumH (): [6 Marks] accept one parameter (newN), and without return value calculate the sum (use range () to manipulate the accepted parameter of newN in the for loop) and store it in a variable named: sum finally display the sum on screen as the sample output below (c) Write a Python program to create a list with 5 integers, find and display the average value by using built-in functions sum () and len (). .[5 Marks] - Create a list named myLi ist and initialize it with 5 integers below - 11,22,33,44, ab Make sure use Your Student ID! - Remark: for integer ab, use the last 2 digits of vour student ID. E.g. Use 55 for ab above, if your student ID is 55 Display the list values on a single line by using for loop Determine and display the average (in integer type) of the list by using built-in sum () and len ()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!