Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All python labs in this and subsequent chapters are to be written using a loop that keeps the program running until told to stop. learning

All python labs in this and subsequent chapters are to be written using a loop that keeps the program running until told to stop.
learning objectives
repetition structures
"while" loops
"for" loops.
counters
accumulators
running totals, sentinel values
Instructions
pennies for pay
write a python program that will perform the following:
-first day will pay someone one (1) penny
-second day will double the first day's pay
-third day will double the second day's pay
-fourth day will double the third day's pay
-continue this process for a specified number of days
-display the day count and each day's pay
the program will continue that process for the number of days specified by the user
after all the day's are displayed the program will display the total pay earned
the output will look something like the example below:
Enter the number of days to work: 9
Day Pennies
--------------------
1 $0.01
2 $0.02
3 $0.04
4 $0.08
5 $0.16
6 $0.32
7 $0.64
8 $1.28
9 $2.56
The total salary for 9 days is: $5.11
refer to python program grading rubric for coding requirements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions