wetter_geht_nicht.py
text1 = "Pack die Badehose ein, nimm dein kleines Schwesterlein ..."
text2 = "Hei, hei, hei, so eine Schneeballschlacht ..."
text3 = "I'm singing in the rain ..."
text4 = "Leise rieselt der Schnee ..."
sonst = "Nichts Genaues weiß man nicht!"
def wetter():
luftdruck = raw_input('Luftdruck: ')
temperatur = raw_input('Temperatur: ')
jahreszeit = raw_input('Jahreszeit: ')
if (luftdruck == 'steigt' and temperatur == 'steigt' and jahreszeit == 'Sommer'):
print text1
if (luftdruck == 'steigt' and temperatur == 'fällt' and jahreszeit == 'Winter'):
print text2
if (luftdruck == 'fällt' and temperatur == 'fällt' and jahreszeit == 'Sommer'):
print text3
if (luftdruck == 'fällt' and temperatur == 'steigt' and jahreszeit == 'Winter'):
print text4
else:
print sonst
# testen
wetter()
→ Fenster schließen