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 conjunction best fixes the run-on sentence? Can Michelle climb the rock wall, __________ can I, too? a. nor b. so c. or d. and
whats expression is three times the sum of 8 and 4
PLEASE HELP!!! MATH!!! 20 POINTS!!! Solve the equation. 1.) -1/2 = y -1 2.) -3π + w = 2π 3.) 1.2m = 0.6 4.) q + 2.7 + -0.9
In which system of government would states function independently of each other?
when you divide me by 5 the remainder is 4
What was a result of European settlement in South Africa in the early 1900s?
Fill in the missing numbers ( ) in this pattern: 10 ( ) 22 ( ) 34 ( ) 46 ( ) 58
how do scientists think people migrated from Asia to America's during the last Ice Age
Which of the following proportions are true 1:4= 2:5 6:9= 10:12 5:11= 15:30 2:7= 4:14
Factor: x2 + 5x + 6 a. (x + 3)(x + 2) b. (x - 3)(x + 2) c. (x + 3)(x - 2) d. (x + 5)(x + 1)