AI_PROJECT/Climate.py

40 lines
896 B
Python
Raw Normal View History

2024-05-10 18:33:38 +02:00
seasons={
0:"winter",
1:"spring",
2:"summer",
3:"fall"}
time={
0:"morning",
1:"noon",
2:"afternoon",
3:"night"}
weather={
0:"perfect",
1:"hot",
2:"cold",
3:"freezing",
4:"rainy",
5:"snowy",
6:"storm"}
def getNextSeason(season):
if(season=="winter"):
return seasons[1]
if(season=="spring"):
return seasons[2]
if(season=="summer"):
return seasons[3]
if(season=="fall"):
return seasons[0]
def getNextTime(currentTime):
if(currentTime=="morning"):
return time[1]
if(currentTime=="noon"):
return time[2]
if(currentTime=="afternoon"):
return time[3]
if(currentTime=="night"):
return time[0]