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

Explain how the Trans-Alantic slave trade began?
Solve the equation and state a reason for each step. Show work please. Find x. x + 5 = 2x + 5
Help plz I think it’s 1 but does E count?
Different between accurate and procession measurements ​
Use the drop-down menus to complete the statement about the inequality m ≥ 2. The inequality m ≥ 2 has _____ solutions because ______ can be substituted for m t
Which number line correctly shows 4.5 - 2.5?
a number 84 is divided into two parts. if the difference between half of the first part and one-third of the second part is 12, find two parts of number.
Buck has 45 cookies. He wants to pack an equal number of cookies into different bags. In how many ways can he pack the cookies if he must use at least two bags?
How many numbers can be put in a's place ,for the sentece to be true ?502<385+a<761
ancient egypt what physical feature is to east and west of the nile river​