Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Start your program with a sample run as comments. What will the user see when they run your program? Use real data in your sample
Start your program with a sample run as comments. What will the user see when they run your program? Use real data in your sample run to test your program when it is finished. Open this Replit to see an example of a sample run.
This IS a sample run, user input is shown in blue:
Enter your name: Marcus
Enter your age: 22
Hello Marcus! You were born in 2000
This is NOT a sample run, do not use placeholders for real input data:
Enter your name: [user enters name]
Enter your age: [user enters age]
Hello [name entered]! You were born in [year]!
Are all variables declared at the top of your program and use camelCase or snake_case and start with a lowercase letter?
Did you initialize every variable to a default value?
Did you create constants instead of using magic numbers in your code?
Are your constants all UPPER_CASE letters?
For example:
TAX_RATE =.0775
cost =0.0
final_cost =0.0
cost = float(input(Enter item cost $ ))
final_cost = cost + cost * TAX_RATE
If you are using money, did you format all money output to 2decimal places?
Does your program prompt for at least two related inputs and produce an output?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Improved Program with Sample Run and Commentary Python Declare and initialize variables name age 0 c...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started