kearnyadvertising kearnyadvertising
  • 14-12-2021
  • Computers and Technology
contestada

Write a program that:
a) Asks the user if they want to multiply two numbers that they entered, if their answer equals yes then multiply the numbers else write a message saying "peace out".

Respuesta :

6385726215
6385726215 6385726215
  • 24-12-2021

Answer:

num1 = int(input("Enter number 1: "))

num2 = int(input("Enter number 2: "))

choice = input("Do you want to multiply them?: ")

if choice.capitalize() == "Yes":

   print(num1 * num2)

else:

   print("Peace out.")

Explanation:

Gg ez.

(I wrote the it in python because I don't know what language you want it in. Next time, say what language you want.)

Answer Link

Otras preguntas

Who originally sang somewhere over the rainbow?
A sociological term for fitting in
What is the density of 2.0 g of a substance that has a volume of 5.0 mL?
what are three of Leonardo divinci's contributions to science?
A group of workers can plant 24 acres in 8 days. What is their rate in acres per day?
What are the drawbacks of desalinating water?
A rectangular garden is 4 feet longer than it is wide. Its area is 357 ft.^2. What are its dimensions (width and length)? I got 15 but it's not right
Match the following helping professions to their correct descriptions. 1. forensic psychologist 2. educational psychologist 3. psychiatrist 4. sociologist 5. n
Suppose you are part of a community with a sustainable yield of fish. What does this yield indicate? a. The community has enough fish to fulfill its nutrition
What are character traits that people work toward, in order to become better human beings?A. Right B. Virtues C. Ethics D. Laws