Night 30: Show the world
Você já concluiu esta noite, em Python ou pseudocódigo. Ela conta para ambos. Pratique novamente se quiser.
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!
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
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.
Clique em Executar para ver a saída aqui.
Dificuldade 3/5 · Moedas 200 + pequeno bônus na primeira conclusão hoje
Show what you learned. Build one line in Line with a loop: I can use: OUTPUT, loops, IF, functions. Put , entre the skills, not after the last one.
Clique em Executar para ver a saída aqui.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
Write Certificate(Name : STRING) RETURNS STRING. It returns Kit finished 30 Code Nights! for Kit. Output it for your pet.
Clique em Executar para ver a saída aqui.
Dificuldade 3/5 · Moedas 200 + pequeno bônus na primeira conclusão hoje
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 *.
Clique em Executar para ver a saída aqui.