This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision |
| lehrkraefte:blc:informatik:glf20:programmieren:if-else-quiz [2020/10/28 06:40] – mirco.triner | lehrkraefte:blc:informatik:glf20:programmieren:if-else-quiz [2020/10/30 07:05] (current) – mirco.triner |
|---|
| | ====== Quiz: Selektionen, if-else ====== |
| | |
| | <quizlib id="quiz" rightanswers="[['a0'], ['a3'], ['a3']]" submit="Check Answers"> |
| | |
| | <question title="Welchen Wert hat X nach dem Ausführen des folgenden Codes? |
| | <pre>x = 0 <br>a = 0 <br>b = -5 <br>if a > 0: <br> if b < 0: <br> x = x + 5 <br> elif a > 5: <br> |
| | x = x + 4 <br> else: <br> x = x + 3 <br>else: <br> x = x + 2 <br>print(x) <br>" type="radio">2|0|3|4</question> |
| | |
| | <question title="Welchen Wert hat X nach dem Ausführen des folgenden Codes? |
| | <pre>x = 0 <br>a = 5 <br>b = 5 <br>if a > 0: <br> if b < 0: <br> x = x + 5 <br> elif a > 5: <br> |
| | x = x + 4 <br> else: <br> x = x + 3 <br>else: <br> x = x + 2 <br>print(x) <br>" type="radio">0|4|2|3</question> |
| | |
| | <question title="Was wird nach dem Ausführen des Programms auf der Konsole stehen?<pre>x = 3 <br>if ( x == 0 ):<br> print ("Am I here?")<br>elif ( x == 3 ):<br> print ("Or here?")<br>print ("Or over here?")" type="radio">Am I here?|Or here?|Am I here? Or here?|Or here? Or over here?|Am I here? Or over here?</question> |
| | |
| | |
| | </quizlib> |
| | |
| |