Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Intro to Python, chapter 4, Interface Design: An employee has a strange way of being paid. On the first day of work, they are only

Intro to Python, chapter 4, Interface Design:

An employee has a strange way of being paid. On the first day of work, they are only paid one penny. But on the second day they are paid 2 pennies, and on the third day they are paid 4 pennies, and on the fourth day, they are paid 8 pennies. Their pay rate doubles every day in this manner.

Write a program that asks the user for the number of days to calculate. It will then print a table of what the employee would get paid for each day, and at the end, it will show what the total pay would be. A picture is attached for your reference. This program will make use of for loops, and an accumulator. You should also have a variable for the pay rate - you will need to double the value of this variable for each day. You must have a "main" function.

Grading:

Program compiles with no syntax errors: 12 points

Program does what it's supposed to do: 5 points

You have meaningful comments: 3 points

You should have a multiline comment at the top to describe what the program does

You should have comments that describe what your functions do

You should have comments in your program wherever else would be useful to the reader of your code.

Output:

image text in transcribed

24862486248 5 12486248612499863748 u000013625 -50001375012 5 0 0 0 0 0 0 0 12 1248625124 136362 4 125 0 a 01234567890

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

Optimization And Data Science Trends And Applications 5th Airoyoung Workshop And Airo Phd School 2021 Joint Event

Authors: Adriano Masone ,Veronica Dal Sasso ,Valentina Morandi

1st Edition

3030862887, 978-3030862886

More Books

Students also viewed these Databases questions

Question

1. What is meant by Latitudes? 2. What is cartography ?

Answered: 1 week ago

Question

What is order of reaction? Explain with example?

Answered: 1 week ago