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 group is responsible for bringing the religion of Islam to Africa?
Plz Help me with this
The variety of organisms within an ecosystem is characteristic of which type of diversity? a. Genetic diversity b. Ecosystem diversity c. Species diversity d. R
Sometimes people worry that the president will make decisions
What is the quotient (x^3+8)/(x+2)
George works in an office where smoking is allowed. George develops lung cancer and sues his company, Lennie L.L.C., for hazardous work conditions. What kind of
In the study that the FBI did on examining the physical characteristics of hair, what percentage of the “matches” were not really matches at all?
Remittances are important to developing economies because __________.
In a standard dictionary, where can you find the key to pronunciation marks?         A. In an appendix   B. At the bottom of each page   C. Within the definit
What are the coordinates of point C?