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

What was the policy of containment forged by american diplomat?
Eight-year-old Shaun’s parents are concerned that he may have dissociative amnesia due to his inability to remember certain phases of his life. Why would his do
what happens to the saturation for when adding salt to water at room temperature
3x + 4 = y Solve the formula for x.
bones fitted together in the shape of a skeleton give the human body .
What is the electron configuration of a chlorine ion in a compound of BeCl2? A. [2.8.7]- B. [2.8.8]- C. [2.8.8]+ D. 2.8.7
Select the phrase that best corresponds to the following: el drama (3 points) Question 2 options: 1) es antipático 2) es serio 3) es cómico 4) es di
When constructing inscribed polygons and perpendicular lines, how are the steps similar?
How is the economy of Northern Europe different from that of the United States?
How many 8 ounce bags of trail mix can be filled from a 10 pound bag of trail mix