• Problem 1: Write a program that finds the total amount of candy children collected during Halloween. The program first asks for the number of children and then asks for amount of candy each child collected. When the loop is finished, the program should display the total number of candy collected. Use the following design approach: Write a function that has one parameter - the number of children. The function will read the amount of candy each child collected and output the total amount.
  • In the Gregorian calendar a year is a leap year when the number representing it is divisible by 4, unless it is divisible by 100, unless it is divisible by 400. Thus years such as 1996, 1992, 1988 and so on are leap years because they are divisible by 4 but not by 100. For century years, the 400 rule is important. Thus, century years 1900, 1800 and 1700 while all still divisible by 4 are also exactly divisible by 100. As they are not further divisible by 400, they are not leap years. Also, you can assume that there were no leap years before 1582. Write a program LeapYear.py that asks the user to enter 7 different years and for each year, computes whether that year is a leap year. You can assume that the input is valid.