Question: Programming Project 5 . 3 3 . 2 0 : . Leap years. Write a function def isLeapYear ( year ) that tests whether a

Programming Project 5.33.20: .
Leap years. Write a function
def isLeapYear(year)
that tests whether a year is a leap year: that is, a year with 366 days. Programming Project 5.33.27 describes how to test whether a year is a leap year. In this exercise, use multiple if statements and return statements to return the result as soon as you know it.
Programming Project 5.33.21: .
In Programming Project 3.35.28 you were asked to write a program to convert a number to its representation in Roman numerals. At the time, you did not know how to eliminate duplicate code, and as a consequence the resulting program was rather long. Rewrite that program by implementing and using the following function:
def romanDigit(n, one, five, ten)
That function translates one digit, using the strings specified for the one, five, and ten values. You would call the function as follows:
romanOnes = romanDigit(n %10, "I", "V","X") n = n //10
romanTens = romanDigit(n %10,"X","L","C")
Programming Project 5.33.23: .
Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid time and a half, that is,150 percent of the hourly rate on the hours exceeding 40. Your check should look similar to that in the figure below. Use fictitious names for the payer and the bank. Be sure to use stepwise refinement and break your solution into several functions. Use the intname function to print the dollar amount of the check.

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 Programming Questions!