There are two modes when a cell is highlighted.
(a) 1,2,3,4,5
(b) 5,4,3,2,1
(c) 5,10,15,20,25,30
(d) 30,25,20,15,10,5
(e) Empty sequence
x = 5
while x > 0:
y = int(input())
if y == 25:
continue
x -= 1
print('x =', x)
Example: n = 12, 6, 3, 10, 5, 16, 8, 4, 2, 1.
n
and use a while loop that generates the Collatz sequence.¶
a)
2 2 2 2
4 4 4 4
6 6 6 6
8 8 8 8
b)
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1