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

1.5 as a mixed number in the simplest form
accurately describe the roles of the popes and patrons of the arts in restoring the city of Rome?
Find all complex solutions of the equation x^4 + x^2 - 6 = 0
Who is Jack London and what is he useful for? Where Does he live?
True or False: Conflict sociologists seek to explain educational achievement by looking at the interaction that takes place among students and teachers.
five sixths plus one twelfths
36 is 72% of what number
Jason paints 1/4 of the area of his living room walls,w,on Monday. On Tuesday, he paints twice as much as he painted on Monday. Write an expression to fin
What issues present the most pressing problems for Canada? -high unemployment -lack of natural resources -low standard of living -outdated agricultural system -
A triangle all adds up to 180. What is the measure of the third angle if the two other angles are 75 & 50