Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unit 7 Critical Thinking Questions Critical Thinking Questions This unit included this program for making change: amount = int ( input ( How much

Unit 7 Critical Thinking Questions
Critical Thinking Questions
This unit included this program for making change:
amount = int(input("How much does your item cost in cents?"))
amountOwed =100 amount
print(amountOwed//25, "quarters")
amountOwed = amountOwed %25
print(amountOwed//10, "dimes")
amountOwed = amountOwed %10
print(amountOwed//5, "nickels")
amountOwed = amountOwed %5
print(amountOwed//1, "pennies")
Modify the program so that the user can input the amount paid. You only need to write out the lines of code that you changed.
Modify the program so that the user can input the amount paid. You only need to write out the lines of code that you changed.
Encapsulate the following code into its own function. What shape will the turtle draw? Paste the code as part of your answer.
import turtle
Mark = turtle.Turtle()
Mark.back(80)
Mark.left(90)
Mark.forward(50)
Mark.right(90)
Mark.forward(80)
Mark.back(80)
Mark.left(90)
Mark.forward(50)
Mark.right(90)
Mark.forward(80)
Write a program that will print available if medium is included in the list called inventory (it should be included at the start) and sorry, out of stock if it is not. Then, add a script to remove medium after it has been purchased.
What is one thing that you need to know about the finite limits of numeric data in order to avoid problems with programs that include fractions?
Write a program that allows the user to input two numbers and then outputs the average of the numbers.

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

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

5. Describe how contexts affect listening

Answered: 1 week ago