Skip to content
Snippets Groups Projects
Commit e90f9b4a authored by Franziska Niemeyer's avatar Franziska Niemeyer
Browse files

Upload solutions for gap_exercise3_if_else

parent 69751311
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Python course - Exercises Gap text
%% Cell type:markdown id: tags:
Correct the Code
%% Cell type:code id: tags:
```
# complete the statement for b larger than a
a = 5
b = 10
if b > a:
print('b larger a')
```
%% Output
b larger a
%% Cell type:code id: tags:
```
# complete the statements
a = 5
b = 10
c = 5
if(a < b) and (a == c):
print('a smaller b, but a equals c')
```
%% Output
a smaller b, but a equals c
%% Cell type:code id: tags:
```
# complete the statements
a = 5
b = 10
c = 5
if a <= c:
print('a smaller or equal c')
elif a >= b:
print('a larger or equal b')
```
%% Output
a smaller or equal c
%% Cell type:code id: tags:
```
# complete the statements
a = 5
b = 10
c = 5
if a != c:
print('a not c')
elif a == b:
print('a equals b')
else:
print('None of the above is true')
```
%% Output
None of the above is true
%% Cell type:code id: tags:
```
# complete the statements
a = 5
b = 10
c = 5
if (a != c) or (b != c):
print('a not c OR b not c')
else:
print('None of the above is true')
```
%% Output
a not c OR b not c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment