0 10 20 30 40 50 60 70 80 90 100 94125 0
import random # define show_random_word procedure def show_random_word(): words = ["wibble", "wobble", "plop"] print(random.choice(words)) # call show_random_words twice show_random_word() show_random_word()
You are not logged in
`¬
1!
2"
3£
4$
5%
6^
7&
8*
9(
0)
-_
=+
TAB
Q
W
E
R
T
Y
U
I
O
P
[{
]}
ENTER
CAPS
A
S
D
F
G
H
J
K
L
;:
'@
#~
ENTER
SHIFT
\|
Z
X
C
V
B
N
M
,<
.>
/?
SHIFT
 
SPACE
 

Welcome to type with code

Start typing or press to get going!

The python code you'll be racing to type out is all about:

Create and use a procedure

A procedure is a section of code that has a name that you can re-use to do something useful.

A procedure definition is the code that tells the computer what to do whenever that procedure runs.

The procedure wont actually do anything until you call it.

This example defines a procedure that shows a random word then calls it twice.

0 WPM
0%
0s
0%