while, if, if-else, if-elif-else practice

  1. Write a program that prompts the user to enter one integer. The program will do the following: if the input number is 1, the program will print your name 3 times; if the input number is 2, the program will find the sum of all even numbers between 0 and 10, otherwise, the program will print "I love Python language" 5 times.

  2. Write a program that reads a sequence of integers. Each number indicates the numeric value of the month and one integer that indicates the year. Your program will print the amount of days in the month that was entered. For example, if the input was 5 ( May) the program will output 30 days, if the input was 12 ( December), the program will output 31 days, if the input is 2 ( February), the program will check the year and find out if the amount of days is equal 28 or 29, if the input is less or equal 0 or greater than 12, the program will print the message "Invalid month". Assume that the input sequence is terminated by first zero value.

  3. Write a program that reads a sequence of integers. Each number indicates the numeric value of the day of the week. The program will print the name of the day. For example, if the input is 4 the program should outputs Thursday, if the input is 7, the program outputs Sunday, if the input is non- positive of greater than 7, the program outputs the error message. Assume that the input sequence is terminated by first zero value.