Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
quiz3 [2013/04/08 20:51] admin |
quiz3 [2014/03/09 21:25] (aktuell) admin |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Quiz 3 ====== | ====== Quiz 3 ====== | ||
- | <code python> | + | <code python quiz3.py> |
- | # Python für Kids -- 4. Auflage, Kapitel 4 | + | |
- | # Autor: Gregor Lingl | + | |
- | # Datum: 6. 8. 2009 | + | |
- | # miniquiz03.py : (3) - mit drei Fragen | + | |
punkte = 0 | punkte = 0 | ||
frage = "Welche Programmiersprache lernst du gerade? " | frage = "Welche Programmiersprache lernst du gerade? " | ||
loesung = "Python" | loesung = "Python" | ||
- | antwort = input(frage) | + | antwort = raw_input(frage) |
if antwort == loesung: | if antwort == loesung: | ||
print("Richtig!") | print("Richtig!") | ||
Zeile 21: | Zeile 16: | ||
Funktionsdefinition? """ | Funktionsdefinition? """ | ||
loesung = "def" | loesung = "def" | ||
- | antwort = input(frage) | + | antwort = raw_input(frage) |
if antwort == loesung: | if antwort == loesung: | ||
print("Richtig!") | print("Richtig!") | ||
Zeile 32: | Zeile 27: | ||
frage = "Wieviel reservierte Wörter hat Python? " | frage = "Wieviel reservierte Wörter hat Python? " | ||
loesung = "33" | loesung = "33" | ||
- | antwort = input(frage) | + | antwort = raw_input(frage) |
if antwort == loesung: | if antwort == loesung: | ||
print("Richtig!") | print("Richtig!") |