Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP ME WITH THE CODE IN PYTHON NUMBERS 6,9,11 d/OBSZTA4ouZarZ3ZfWSOWLWppaWEZWFEOM3FBdHVUUG8taGJN/view! WILII ICS uldu / LITUILS is a ricSdni. AL iCast / licuius ait ituuu
PLEASE HELP ME WITH THE CODE IN PYTHON NUMBERS 6,9,11
d/OBSZTA4ouZarZ3ZfWSOWLWppaWEZWFEOM3FBdHVUUG8taGJN/view! WILII ICS uldu / LITUILS is a ricSdni. AL iCast / licuius ait ituuu cu LU VE a Sophomore, 16 to be a Junior and 26 to be classified as a Senior. Write a program that calculates class standing from the number of credits earned. 5. The body mass index (BMI) is calculated as a person's weight (in pounds) times 720, divided by the square of the person's height (in inches). A BMI in the range 1925, inclusive, is considered healthy. Write a program that calculates a person's BMI and prints a message telling whether they are above, within, or below the healthy range. 6. The speeding ticket fine policy in Podunksville is $50 plus $5 for each mph over the limit plus a penalty of $200 for any speed over 90 mph. Write a program that accepts a speed limit and a clocked speed and either prints a message indicating the speed was legal or prints the amount of the fine, if the speed is illegal. 7. A babysitter charges $2.50 an hour until 9:00 PM when the rate drops to $1.75 an hour (the children are in bed). Write a program that accepts a starting time and ending time in hours and minutes and calculates the total babysitting bill. You may assume that the starting and ending times are in a single 24-hour period. Partial hours should be appropriately prorated. 8. A person is eligible to be a US senator if they are at least 30 years old and have been a US citizen for at least 9 years. To be a US representative thoce numbers are 25 and 7 resnectively. Write a program that accepts a PPULLUT LUIVISPBUHVUUG8taGJN/view and have been a US citizen for at least 9 years. To be a US representative these numbers are 25 and 7, respectively. Write a program that accepts a person's age and years of citizenship as input and outputs their eligibility for the Senate and House. 9. A formula for computing Easter in the years 19822048, inclusive, is as follows: let a = year%19, b = year%4, c= year%7, d = (19a +24)%30, e = (20 + 40 + 6 + 5)%7. The date of Easter is March 22 +d+e (which 240 Chapter 7. Decision Structures could be in April). Write a program that inputs a year, verifies that it is in the proper range, and then prints out the date of Easter that year. 10. The formula for Easter in the previous problem works for every year in the range 1900-2099 except for 1954, 1981, 2049, and 2076. For these 4 years it produces a date that is one week too late. Modify the above program to work for the entire range 1900-2099. Chapter 7. Decision Structures could be in April). Write a program that inputs a year, verifies that it is in the proper range, and then prints out the date of Easter that year.' 10. The formula for Easter in the previous problem works for every year in the range 19002099 except for 1954, 1981, 2049, and 2076. For these 4 years it produces a date that is one week too late. Modify the above program to work for the entire range 1900-2099. 11. A year is a leap year if it is divisible by 4, unless it is a century year that is not divisible by 400. (1800 and 1900 are not leap years while 1600 and 2000 are.) Write a program that calculates whether a year is a leap year. 12. Write a program that accepts a date in the form month/day/year and out- puts whether or not the date is valid. For example 5/24/1962 is valid, but 9/31/2000 is not. (September has only 30 days.) 13. The days of the year are often numbered from 1 through 365 (or 366). This number can be computed in three steps using int arithmetic: (a) dayNum = 31(month - 1) + day (b) if the month is after February subtract (4(month) +23)//10 (C) if it's a leap year and after February 29, add 1 Write a program that accepts a date as month/day/year, verifies that it is a valid date (see previous problem), and then calculates the correspondingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started