10000 Updated session 3 and added multiple choice questions: · ihf-code/python@bccde5e · GitHub
[go: up one dir, main page]

Skip to content

Commit bccde5e

Browse files
committed
Updated session 3 and added multiple choice questions:
1 parent d51324f commit bccde5e

File tree

4 files changed

+108
-25
lines changed

4 files changed

+108
-25
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# KPMG:Code - Session 3 - Multiple Choice Questions
2+
3+
1. What is a conditional?
4+
- an expression that allows a user to enter an input
5+
- an expression that allows a computer to make a decision - A
6+
- an expression that allows a computer to print an output
7+
- an expression that makes a string upper case
8+
9+
2. What will be the output of the below?
10+
sum = 5 + 6
11+
12+
if sum == 10:
13+
print("The value is 10")
14+
15+
- 10
16+
- The value is 10
17+
- There will be no output - A
18+
- 11
19+
20+
3. What will be the output of the below?
21+
name = "Jackie"
22+
23+
if name == "Anita":
24+
print("Hello Anita")
25+
print("How are you?")
26+
27+
print("Thanks")
28+
29+
- Thanks - A
30+
- Hello Anita
31+
- How are you?
32+
- Hello Anita How are you? Thanks
33+
34+
4. What does the == comparator mean?
35+
36+
- equals - A
37+
- does not equal
38+
- greater than
39+
- less than or equal to
40+
41+
5. What does the != comparator mean?
42+
43+
- equals
44+
- does not equal - A
45+
- greater than
46+
- less than or equal to
47+
48+
6. What is the output of below?
49+
age = 15
50+
if age >= 21:
51+
print("You can vote")
52+
else:
53+
print("You cannot vote")
54+
55+
- You can vote
56+
- You cannot vote - A
57+
58+
7. What is the output of below?
59+
traffic_light = "red"
60+
61+
if traffic_light == "green":
62+
print("You can go!")
63+
elif traffic_light == "amber":
64+
print("Get ready to stop..")
65+
else:
66+
print("STOP!")
67+
68+
- Get ready to stop..
69+
- STOP!
70+
- You can go! - A
71+
72+
8. What will be the output of the below:
73+
age = 0
74+
75+
if age <= 13:
76+
print("You are 13 or younger")
77+
elif age < 18:
78+
print("You are between 14 and 17")
79+
elif age == 0:
80+
print("You aren't born yet")
81+
else:
82+
print("You are 19 or over")
83+
84+
- You are 13 or younger - A
85+
- You are between 14 and 17
86+
- You aren't born yet
87+
- You are 19 or over
88+
89+
9. What will be the output of the below:
90+
age = 14
91+
if age > 12 and age < 20:
92+
print("You are a teenager")
93+
94+
- You are a teenager
95+
- You are not a teenager
96+
97+
10. What will be the output of the below:
98+
age = 12
99+
if age < 13 or age > 19:
100+
print("You are not a teenager")
101+
102+
- You are a teenager
103+
- You are not a teenager

session_03/slides/answers_3.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
# [fit] IHF: Code
1+
# [fit] KPMG: Code
22
## [fit] Python — Session 3 — Answers
3-
### Live at 10am
43

54
---
65

76
## Any Questions
8-
### go to sli.do #python2020
9-
10-
---
11-
12-
# [fit] Next Session
13-
### Tuesday 26th May 10am
14-
### Lesson 4

session_03/slides/session_3.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# [fit] IHF: Code
1+
# [fit] KPMG: Code
22
## [fit] Python — Session 3 — Lesson
3-
### Live at 10am
43

54
---
65

@@ -9,7 +8,7 @@
98
---
109
# Text Editor
1110

12-
### https://repl.it
11+
### https://replit.com
1312

1413
---
1514

@@ -111,7 +110,6 @@ print("In 10 years you will be " + str(age_in_10_years))
111110
---
112111

113112
## Any Questions?
114-
### sli.do #python2020
115113

116114
---
117115

@@ -368,13 +366,3 @@ if not (age > 12 and age < 20):
368366
# [fit] Coding Time
369367
## Section B
370368

371-
---
372-
373-
### Questions?
374-
### go to sli.do #python2020
375-
376-
---
377-
378-
# [fit] Next Session
379-
### Thursday 21st May 10am
380-
### Answers

session_03/slides/thumbnails_3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# [fit] IHF: Code
1+
# [fit] KPMG: Code
22
## [fit] Python — Session 3 — Lesson
33

44
---
55

6-
# [fit] IHF: Code
6+
# [fit] KPMG: Code
77
## [fit] Python — Session 3 — Answers

0 commit comments

Comments
 (0)
0