(3/10)
Counting Sheep (Loops) — Python typing lesson
Master counting with numbers and basic arithmetic in Python.
What you'll practice
help the sleepy robot count sheep using loops! a loop repeats code for us.
- a for loop repeats a block of code a specific number of times.
- range(5) creates a sequence of numbers from 0 to 4.
🐍Python
Counting Sheep (Loops)
0 WPM
0% Accuracy
0:00 Time elapsed
1
2
3
for sheep_count in range(5):↵
print('sheep number:')↵
print(sheep_count)
0 / 78
Press This!
👇
`~
1!
2@
3#
4$
5%
6^
7&
8*
9(
0)
-_
=+
⌫
⇥
Q
W
E
R
T
Y
U
I
O
P
[{
]}
\|
⇪
A
S
D
G
H
J
K
L
;:
'"
↵
⇧
Z
X
C
V
B
N
M
,<
.>
/?
⇧
Thumb
Index
Middle
Ring
Pinky