Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
quiz5 [2013/04/16 16:20] admin |
quiz5 [2015/05/28 12:45] (aktuell) admin |
||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Quiz 5 ====== | ====== Quiz 5 ====== | ||
| - | <code python> | + | <code python quiz5.py> |
| + | #Python3 | ||
| + | # -*- coding: utf-8 -*- | ||
| + | from __future__ import print_function | ||
| def quizfrage(): | def quizfrage(): | ||
| global punkte | global punkte | ||
| - | antwort = input(frage) | + | antwort = raw_input(frage) |
| if antwort == loesung: | if antwort == loesung: | ||
| print("Richtig!") | print("Richtig!") | ||
| Zeile 20: | Zeile 23: | ||
| loesung = "Python" | loesung = "Python" | ||
| quizfrage() | quizfrage() | ||
| - | frage = "Mit welchem reservierten Wort beginnt eine | + | frage = """Mit welchem reservierten Wort beginnt eine |
| - | Funktionsdefinition? " | + | Funktionsdefinition? """ |
| loesung = "def" | loesung = "def" | ||
| quizfrage() | quizfrage() | ||