10,354 views
36 votes
36 votes
Pennies for Pay Design and write a python program to pass Lab 4-7 with the following modifications: 1.use an outer loop to keep the program running until zero (0) day for the payroll calculation be entered 2.use an inner loop to calculate and print the daily and total payroll

Pennies for Pay Design and write a python program to pass Lab 4-7 with the following-example-1
User MeanwhileInHell
by
2.7k points

1 Answer

21 votes
21 votes

Answer:

Here you go, change it however you'd like :)

Step-by-step explanation:

(A nested loop was not needed to fulfill this task)

usr = int(input("How many days would you like to calculate: "))

pen = 0.01

for n in range(1, usr + 1):

print(f"Day: {n} | Amount: ${pen}")

pen += pen

User Katulus
by
2.8k points