idjfjcjs7291 idjfjcjs7291
  • 02-12-2022
  • Computers and Technology
contestada

Write a program that accept a whole number a input, mutiplie that number by 21, and then output the product

Respuesta :

candlejenner candlejenner
  • 03-12-2022

Answer:

while True:

   try:

       whole_number = int(input("Enter a whole number: "))

       break

   except ValueError:

       print("That is not a whole number. Try again.")

product = whole_number * 21

print("The product is", product)

Explanation:

using while true and except ValueError to make sure the user enters a whole number

Answer Link

Otras preguntas

Which of the following is a concern of environmentalists?
AM is a median in △ABC (M∈ BC ). A line drawn through point M intersects AB at its midpoint P. Find areas of △APC and △PMC, if Area of APM=35m^2.
Social Studies Question: Help me please.
Combine the like terms to create an equivalent expression 3z+2+(-5z)+6
Sara has 10 apples and four bannas she gives Peter 2 apples how many do Sara has left
Write the equation in slope-intercept form that contains the following point and is perpendicular to the given line y = -4x + 3; (4, -2)
What are shock waves? How are they produced?
There are 15 people in the drama club, and they chose shirts that are $7 each. The total cost for the shirts was $150. Write an equation whose solution is the p
Determine which sides of quadrilateral ABCD must be parallel. If angle A is 72 degrees, angle B is 108 degrees, angle C is 72 degrees and angle D is 108 degrees
How many reflection symmetries does a five-pointed star have?