[SOLVED] Programming Exercise 4-7

$25

File Name: Programming_Exercise_4-7.zip
File Size: 226.08 KB

5/5 - (1 vote)

Programming Exercise 4-7

# Declare variables for the number of pennies

# per day, the number of days, and the total

# number of pennies.

dayPennies = 1

numDays = 0

total = 0.0

# Get number of days from the user.

numDays = int(input(Enter the number of days: ))

# Display table showing salary for each day.

print (DaytPennies)

print (-)

for day in range(1, numDays + 1):

print(day, t$, float(dayPennies / 100))

total += dayPennies

dayPennies *= 2

# Display total pay.

print(The total salary for, numDays,

days is: $,float(total/100))

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Programming Exercise 4-7
$25