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

use the function rule, y= 2x+5, to find the values of y when x =1,2,3,4. write the answers as ordered pairs that would be used to graph the function. show your
what were the four main causes of the Cold War
which of the following would not make a good insulator* rubber*plastic*wood*metal
How many corners are in a rectangle and how many flat faces
what were the main ideas of the reformation?
Which statement best describes a capsid? a. A capsid defines the shape of the virus. b. A capsid is the outside coat of the virus. c. A capsid is a protein coat
What is a unit of area with dimensions 1unit x 1unit x 1unit= ?
Maria exercises for 2 1/7 hours every Saturday. She runs for 1/3 of the time that she exercises. How much time does she spend running every Saturday?
Why didn't the first stars to form have solar systems with Earth like planets and satellites?
What would be m minus 4 in an algebraic expression