This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
lehrkraefte:blc:informatik:glf20:programmieren:if-else-quiz [2020/10/28 07:35] mirco.triner |
lehrkraefte:blc:informatik:glf20:programmieren:if-else-quiz [2020/10/28 10:31] mirco.triner |
====== Quiz: Selektionen, if-else ====== | ====== Quiz: Selektionen, if-else ====== |
| |
<quizlib> | <quizlib id="quiz" rightanswers="[['a0'], ['a3'], ['a3']]" submit="Check Answers"> |
<question title="Welchen Wert hat X nach dem Ausführen des folgenden Codes? | <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> | <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> |
| |
<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> | <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> |
| |
<question title="Wie ist die Ausgabe nach dem Ausführen des Codes?<pre>for num in range(10, 14):<br> for i in range(2, num):<br> if num%i == 1:<br> print(num)<br> break" type="radio">10 11 12 13|11 13</question> | |
| |
| |