What to do with None?

Guys why when I run this program, climbs None

def weather(gorod):
print("right now, 30 degrees celsiu!")

s = input ("Enter 'pogoda' : ")
if s == "pogoda":
April 3rd 20 at 18:26
1 answer
April 3rd 20 at 18:28
Your function weather() returns nothing and just prints the string in console, so basically you will be displayed with the line and Noneto fix this, use the operator return, which will return "right now, 30 degrees celsiu!".

And better use the English language.

def weather(city):
 return "is Now 30 degrees Celsius!"

s = input("Enter a word: \"weather\"")
if s.lower() == "weather":
Thank you ! - christopher_Romaguera95 commented on April 3rd 20 at 18:31

Find more questions by tags Python