devondenham12 devondenham12
  • 09-11-2017
  • Computers and Technology
contestada

can some one fix this
input ("Enter a number: ")
print (num * 8)

Respuesta :

Zepdrix
Zepdrix Zepdrix
  • 09-11-2017
If you save the input as num,
this will print the input 8 times.

num = input("Enter a number: ")
print(num * 8)

If you want to do actual math calculations,
then the input needs to be a number.

num = float(input("Enter a number: "))
print(num * 8)

This doesn't account for any errors in which the user doesn't input a number, but I don't think that's what you were looking for anyway :)
Answer Link

Otras preguntas

Can someone help me plaseee
Samuel drove 28 miles in 32 minutes. Beverly drove 42 miles in 48 minutes. Are the ratios of miles to minutes for Samuel and Beverly proportional?
True or false All life requires sonar energy to live.
Help please ASAP !!!!
WILL BE MARKED BRAINLIEST!!!!!!
What short-term effect does alcohol have on the brain? A. It increases the heart rate. B. It causes blood vessels to enlarge. C. It can cause vomiting. D. I
Which of the following is a compound sentence? A. Anywhere you want to go, we will follow. B. Do you want to go to the diner? C. After the rain stopped,
80% of Vanessa's final grade is based on the average score of her quizzes, which is 73. 20% of her grade is based on the score of her final. What is the lowest
trade across the Sahara became possible and explore how it impacted West African. empires, such as Ghana, Mali, Songhai, and Benin.
Please help me asap!!!!
good job