Night 30: Show the world
You already finished this night, in Python or pseudocode. It counts for both. Practise again if you like.
Tonight: show the world
- This is night 30! Finish it, and your pet becomes a star.
- Tonight you make a card to show what you and your pet can do.
Words for tonight
| Word | Meaning |
|---|---|
| share | show something to other people |
| card | a small, nice page with some facts |
| proud | happy about something good that you did |
Look how far you came
| Week | You learned |
|---|---|
| 1 | OUTPUT, variables, INPUT, numbers, IF, arrays, FOR |
| 2 | WHILE, RAND, procedures, parameters, functions |
| 3 | text functions, joining with &, records, totals, largest, smallest |
| 4 | nested loops, 2D arrays, a game loop, input checks, clean code |
| 5 | your own pet game |
- These are the building blocks of Paper 2 answers. You know them all now.
Commas between items
- Add
,before each item except the first. Then there is no comma at the end.
DECLARE Toys : ARRAY[1:3] OF STRING
DECLARE Index : INTEGER
DECLARE Line : STRING
Toys[1] ← "ball"
Toys[2] ← "kite"
Toys[3] ← "box"
Line ← "Toys: "
FOR Index ← 1 TO 3
IF Index > 1 THEN
Line ← Line & ", "
ENDIF
Line ← Line & Toys[Index]
NEXT Index
OUTPUT Line
What next?
- Go back to your hub: your pet's card is ready to save and share.
- Want more? The full AS-Level Pseudocode course goes deeper into every idea.
- Keep coding a little every day. Ten minutes a night is how you learned all this!
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Make your pet's star card. Read a name and a kind. Output 4 lines: *** 30 Code Nights ***, Name: Kit, Kind: fox, Nights: 30/30.
Click Run to see the output here.
Difficulty 3/5 · 200 coins + a small bonus on first completion today
Show what you learned. Build one line in Line with a loop: I can use: OUTPUT, loops, IF, functions. Put , between the skills, not after the last one.
Click Run to see the output here.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Write Certificate(Name : STRING) RETURNS STRING. It returns Kit finished 30 Code Nights! for Kit. Output it for your pet.
Click Run to see the output here.
Difficulty 3/5 · 200 coins + a small bonus on first completion today
Put a name in a frame of stars. Read a name. The top and bottom lines have LENGTH(Name) + 4 stars. The middle line is * Kit *.
Click Run to see the output here.