1. Write a Python program that prompts the user to enter the current month name and prints the season for that month.
Hint: If the user enters March, the output should be “Spring”; if the user enters June, the output should be “Summer”.
2. Write a Python program using the recursive/loop structure to print out an equilateral triangle below (double spacing and one space between any two adjacent asterisks in the same row).
* * *
* * * * *
3. Write a Python program that prints all the numbers from 0 to 10 except 3 and 6.
Hint : Use ‘continue’ statement.
Expected Output : 0 1 2 4 5 7 8 9 10
(You can add spaces or commas between these numbers if you like)
4. Write a Python program to calculate the sum and average of n integer numbers (n is provided by the user). Enter 0 to finish.
5. Grades are values between zero and 10 (both zero and 10 included), and are always rounded to the nearest half point. To translate grades to the American style, 8.5 to 10 become an â€œA,â€ 7.5 and 8 become a â€œB,â€ 6.5 and 7 become a â€œC,â€ 5.5 and 6 become a â€œD,â€ and other grades become an â€œF.â€ Implement this translation, whereby you ask the user for a grade, and then give the American translation. If the user enters a grade lower than zero or higher than 10, just give an error message. You do not need to handle the user entering grades that do not end in .0 or .5, though you may do that if you like â€“ in that case, if the user enters such an illegal grade, give an appropriate error message.
NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.
The post python assignment 42 appeared first on Custom Nursing Help.