We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 152cf25 commit 54b9a07Copy full SHA for 54b9a07
unit7_ex7.1.3.py
@@ -0,0 +1,32 @@
1
+# exercise 7.1.3 from unit 7
2
+'''
3
+Here are two pieces of code that include a while loop. Match each loop with the output obtained when it runs.
4
+
5
+Choose the output obtained by running each of the loops.
6
7
+Guidelines
8
9
+It is recommended to use tracking tables.
10
11
12
+# 1
13
14
+i = 11
15
+while i > 0:
16
+ i -=1
17
+ if i == 5:
18
+ break
19
+ print(i)
20
21
+# Answer: 10 next line 9 than 8 7 6
22
23
+# 2
24
25
26
27
28
29
+ continue
30
31
32
+# Answer: 10 next line 9 than 8 7 6 4 3 2 1 0
0 commit comments