-1

I am a rookie in programing, so I needs some help with my codes!

I can't run the following program correctly, I get the type error I just want to know why it doesn't work. Thank you in advance!

def main():
  celsius = input("celsius: ")
  farhrenheit = (celsius * ( 9/5 ) + 32)
  print (farhrenheit)
main()

it pomps out this:

TypeError: can't multiply sequence by non-int of type 'float'

Andrew LaPrise
  • 3,373
  • 4
  • 32
  • 50
Trunks
  • 1
  • 1

1 Answers1

0

Add a float function.

celsius = float(input("celsius: "))
Tony
  • 2,658
  • 2
  • 31
  • 46