Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations update from Hosted Weblate #5894

Closed
wants to merge 149 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
3e99e78
Translated using Weblate (Kabyle)
Oct 29, 2024
4096fb3
Merge remote-tracking branch 'origin/main'
weblate Oct 29, 2024
c08d814
Merge remote-tracking branch 'origin/main'
weblate Oct 29, 2024
2ebf72b
Merge remote-tracking branch 'origin/main'
weblate Oct 29, 2024
bbe018c
Translated using Weblate (Dutch)
Oct 29, 2024
d89a00e
Translated using Weblate (Turkish)
Oct 29, 2024
e5b0bb9
Translated using Weblate (Thai)
Oct 29, 2024
0cda669
Translated using Weblate (Telugu)
Oct 29, 2024
de67771
Translated using Weblate (Portuguese (Brazil))
Oct 29, 2024
055192d
Translated using Weblate (German)
Oct 29, 2024
ee4ed00
Translated using Weblate (Greek)
Oct 29, 2024
1fcfce3
Translated using Weblate (Esperanto)
Oct 29, 2024
5b67545
Translated using Weblate (Estonian)
Oct 29, 2024
012b825
Translated using Weblate (Russian)
Oct 29, 2024
0d579a3
Translated using Weblate (Bengali)
Oct 29, 2024
7797a5d
Translated using Weblate (Bulgarian)
Oct 29, 2024
0235efe
Translated using Weblate (Ukrainian)
Oct 29, 2024
974ab8b
Translated using Weblate (Japanese)
Oct 29, 2024
b7d210d
Translated using Weblate (Welsh)
Oct 29, 2024
3050a5f
Translated using Weblate (Czech)
Oct 29, 2024
c1490d5
Translated using Weblate (Vietnamese)
Oct 29, 2024
b50a943
Translated using Weblate (Hungarian)
Oct 29, 2024
979a75d
Translated using Weblate (Hindi)
Oct 29, 2024
432649e
Translated using Weblate (Hebrew)
Oct 29, 2024
093db20
Translated using Weblate (Polish)
Oct 29, 2024
a64396f
Translated using Weblate (Swahili)
Oct 29, 2024
280bc72
Translated using Weblate (Italian)
Oct 29, 2024
39121df
Translated using Weblate (Arabic)
Oct 29, 2024
68525d5
Translated using Weblate (Indonesian)
Oct 29, 2024
ac0506b
Translated using Weblate (Spanish)
Oct 29, 2024
5320f8d
Translated using Weblate (French)
Oct 29, 2024
7cfa7d1
Translated using Weblate (Frisian)
Oct 29, 2024
5238446
Translated using Weblate (Swedish)
Oct 29, 2024
a22f7f6
Translated using Weblate (Persian)
Oct 29, 2024
0e667df
Translated using Weblate (Finnish)
Oct 29, 2024
05cf174
Translated using Weblate (Albanian)
Oct 29, 2024
2020fb4
Translated using Weblate (Korean)
Oct 29, 2024
5bae1e8
Translated using Weblate (Urdu)
Oct 29, 2024
dd140a6
Translated using Weblate (Portuguese (Portugal))
Oct 29, 2024
8e4515f
Translated using Weblate (Tagalog)
Oct 29, 2024
47f5060
Translated using Weblate (Chinese (Traditional Han script))
Oct 29, 2024
9b8ac15
Translated using Weblate (Chinese (Simplified Han script))
Oct 29, 2024
5fe7a1b
Translated using Weblate (Tswana)
Oct 29, 2024
e079130
Translated using Weblate (Norwegian Bokmål)
Oct 29, 2024
a4c2c74
Translated using Weblate (Punjabi (Pakistan))
Oct 29, 2024
338b3bb
Translated using Weblate (Catalan)
Oct 29, 2024
92a8ad3
Translated using Weblate (Romanian)
Oct 29, 2024
0d7a465
Translated using Weblate (Danish)
Oct 29, 2024
613f1f4
Translated using Weblate (Serbian)
Oct 29, 2024
4d6a5ab
Translated using Weblate (Kurdish (Northern))
Oct 29, 2024
297251b
Translated using Weblate (Papiamento)
Oct 29, 2024
43c2594
Translated using Weblate (Maori)
Oct 29, 2024
93e3e7f
Translated using Weblate (Interlingua)
Oct 29, 2024
9d75199
Translated using Weblate (Slovenian)
Oct 29, 2024
2f2bb01
Translated using Weblate (Iban)
Oct 29, 2024
94f9b9f
Translated using Weblate (Malay)
Oct 29, 2024
00c19ae
Translated using Weblate (French (Canada))
Oct 29, 2024
66aec48
Translated using Weblate (Persian (Old))
Oct 29, 2024
05adcba
Translated using Weblate (Croatian)
Oct 29, 2024
c8d9903
Translated using Weblate (Uzbek)
Oct 29, 2024
0eb5ddf
Translated using Weblate (Nepali)
Oct 29, 2024
44ab1ee
Translated using Weblate (Tamil)
Oct 29, 2024
2b0e6cb
Translated using Weblate (Kabyle)
Oct 29, 2024
05a063f
Translated using Weblate (Hebrew)
Oct 29, 2024
3da811b
Translated using Weblate (Tswana)
Oct 29, 2024
49ad444
Translated using Weblate (Urdu)
Oct 29, 2024
9e1139e
Translated using Weblate (Thai)
Oct 29, 2024
657d881
Translated using Weblate (Albanian)
Oct 29, 2024
eb70696
Translated using Weblate (Punjabi (Pakistan))
Oct 29, 2024
4f458f0
Translated using Weblate (Vietnamese)
Oct 29, 2024
aafdb41
Translated using Weblate (Tagalog)
Oct 29, 2024
9d11e99
Translated using Weblate (Finnish)
Oct 29, 2024
6cd9667
Translated using Weblate (Telugu)
Oct 29, 2024
a3567f8
Translated using Weblate (Welsh)
Oct 29, 2024
23ac6fc
Translated using Weblate (Chinese (Traditional Han script))
Oct 29, 2024
fd1cd3a
Translated using Weblate (Catalan)
Oct 29, 2024
75d2470
Translated using Weblate (Romanian)
Oct 29, 2024
f506ead
Translated using Weblate (Kurdish (Northern))
Oct 29, 2024
9d71c0e
Translated using Weblate (Papiamento)
Oct 29, 2024
8b200c7
Translated using Weblate (Maori)
Oct 29, 2024
6b66bca
Translated using Weblate (Interlingua)
Oct 29, 2024
2dbe66a
Translated using Weblate (Iban)
Oct 29, 2024
89ed494
Translated using Weblate (Malay)
Oct 29, 2024
68a955c
Translated using Weblate (Persian (Old))
Oct 29, 2024
c2ab5e4
Translated using Weblate (Croatian)
Oct 29, 2024
3b3c8fc
Translated using Weblate (Uzbek)
Oct 29, 2024
a386bd0
Translated using Weblate (Nepali)
Oct 29, 2024
470e328
Translated using Weblate (Tamil)
Oct 29, 2024
16031d0
Translated using Weblate (Kabyle)
Oct 29, 2024
794a5b0
Translated using Weblate (Bulgarian)
Oct 29, 2024
36e1aeb
Translated using Weblate (Czech)
Oct 29, 2024
20cb1f9
Translated using Weblate (German)
Oct 29, 2024
ae0efea
Translated using Weblate (Greek)
Oct 29, 2024
f896b1b
Translated using Weblate (Spanish)
Oct 29, 2024
94965e1
Translated using Weblate (French)
Oct 29, 2024
8dbff9d
Translated using Weblate (Frisian)
Oct 29, 2024
ad4cb47
Translated using Weblate (Hindi)
Oct 29, 2024
9def6e9
Translated using Weblate (Hungarian)
Oct 29, 2024
9f53c95
Translated using Weblate (Indonesian)
Oct 29, 2024
9c5c0f2
Translated using Weblate (Italian)
Oct 29, 2024
0703fe6
Translated using Weblate (Dutch)
Oct 29, 2024
127408e
Translated using Weblate (Norwegian Bokmål)
Oct 29, 2024
e4036b3
Translated using Weblate (Portuguese (Brazil))
Oct 29, 2024
70f04b0
Translated using Weblate (Portuguese (Portugal))
Oct 29, 2024
ec4f4ca
Translated using Weblate (Swahili)
Oct 29, 2024
393ac2a
Translated using Weblate (Chinese (Simplified Han script))
Oct 29, 2024
fc6dddd
Translated using Weblate (Turkish)
Oct 29, 2024
05ca264
Translated using Weblate (Russian)
Oct 29, 2024
00b4255
Translated using Weblate (Bengali)
Oct 29, 2024
f639306
Translated using Weblate (Polish)
Oct 29, 2024
fc6e50e
Translated using Weblate (Arabic)
Oct 29, 2024
3796376
Translated using Weblate (Persian)
Oct 29, 2024
2bcf80c
Translated using Weblate (Esperanto)
Oct 29, 2024
cf065c9
Translated using Weblate (Estonian)
Oct 29, 2024
3cd5b99
Translated using Weblate (Japanese)
Oct 29, 2024
6f88ec5
Translated using Weblate (Hebrew)
Oct 29, 2024
33d0071
Translated using Weblate (Swedish)
Oct 29, 2024
4e8ec95
Translated using Weblate (Korean)
Oct 29, 2024
86215cb
Translated using Weblate (Tswana)
Oct 29, 2024
6768d51
Translated using Weblate (Urdu)
Oct 29, 2024
16dee3a
Translated using Weblate (Thai)
Oct 29, 2024
69a007f
Translated using Weblate (Albanian)
Oct 29, 2024
67fbc78
Translated using Weblate (Ukrainian)
Oct 29, 2024
84ea975
Translated using Weblate (Punjabi (Pakistan))
Oct 29, 2024
df99042
Translated using Weblate (Vietnamese)
Oct 29, 2024
349c9eb
Translated using Weblate (Tagalog)
Oct 29, 2024
854aa45
Translated using Weblate (Finnish)
Oct 29, 2024
3fba7ce
Translated using Weblate (Telugu)
Oct 29, 2024
5201c5e
Translated using Weblate (Welsh)
Oct 29, 2024
8102148
Translated using Weblate (Chinese (Traditional Han script))
Oct 29, 2024
ba4bbca
Translated using Weblate (Catalan)
Oct 29, 2024
1089643
Translated using Weblate (Romanian)
Oct 29, 2024
351c8ba
Translated using Weblate (Danish)
Oct 29, 2024
6796b41
Translated using Weblate (Serbian)
Oct 29, 2024
a50b189
Translated using Weblate (Kurdish (Northern))
Oct 29, 2024
b53d911
Translated using Weblate (Papiamento)
Oct 29, 2024
0ccdc95
Translated using Weblate (Maori)
Oct 29, 2024
7c3a7be
Translated using Weblate (Interlingua)
Oct 29, 2024
bdf9e52
Translated using Weblate (Slovenian)
Oct 29, 2024
7ba8a89
Translated using Weblate (Iban)
Oct 29, 2024
34e2dbb
Translated using Weblate (Malay)
Oct 29, 2024
7b8d601
Translated using Weblate (French (Canada))
Oct 29, 2024
81d64f3
Translated using Weblate (Persian (Old))
Oct 29, 2024
df9afee
Translated using Weblate (Croatian)
Oct 29, 2024
938ec71
Translated using Weblate (Uzbek)
Oct 29, 2024
afd6c0f
Translated using Weblate (Nepali)
Oct 29, 2024
a8079b2
Translated using Weblate (Tamil)
Oct 29, 2024
44b814a
Translated using Weblate (Kabyle)
Oct 29, 2024
c6d9055
🤖 Automatically update generated files
weblate Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions content/cheatsheets/ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,73 @@
fruit = ['banana', 'apple', 'cherry']
random_fruit = fruit[{random}]
{print} random_fruit
17:
- name: '{elif}'
explanation: '`{elif}`'
demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'"
- name: '{print}'
demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'"
explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement!
- explanation: We need to do the same with all of our `{if}` statements.
name: '{if}'
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'"
18:
- name: '{print}'
explanation: After `{print}` you need to use parentheses.
demo_code: "{print}('hi!')"
- name: '{range}'
explanation: After `{range}` you need to use parentheses.
demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)"
- name: '{print} with var'
demo_code: "name = 'Hedy'\n{print}('my name is ', name)"
explanation: With `{print}` you need to use parentheses and commas if you print more items.
- explanation: Use `{input}` instead of `{ask}` to ask something.
name: ask something with {input}
demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)"
13:
- explanation: Two parts both need to be correct.
demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {and} answer2 {is} 4\n {print} 'Both answers are correct!'\n{else}\n {print} 'At least one answer is wrong!'"
name: '{and}'
- demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {or} answer2 {is} 4\n {print} 'At least one answer is correct!'\n{else}\n {print} 'Both answers are wrong!'"
name: '{or}'
explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine.
9:
- name: '{if} with multiple lines'
demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20\n {print} 'Well done!!'\n {print} 'The answer is indeed' answer\n{else}\n {print} 'Wrong'\n {print} 'The answer is 20'"
explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines.
- explanation: Repeat multiple lines.
name: '{repeat} with turtle'
demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50"
11:
- demo_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
explanation: We can use `{for}` with a `{range}`.
name: '{for} loop'
- name: '{ask}'
explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines.
demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'"
14:
- explanation: We use the `<` to check if the first number is smaller than the second number.
demo_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'"
name: Smaller
- demo_code: "age = {ask} 'How old are you?'\n{if} age > 13\n {print} 'You are older than me!'"
name: Bigger
explanation: We use the `>` to check if the first number is bigger than the second number.
- demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer == 25\n {print} 'That is correct!'"
name: Equal
explanation: We use the `==` to check if two things are the same.
- explanation: We use the `!=` to check if two things are not the same.
name: Not equal
demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer != 25\n {print} 'That is not correct!'"
- name: Smaller or equal
demo_code: "age = {ask} 'How old are you?'\n{if} age <= 12\n {print} 'You are younger than me!'"
explanation: We use the `<=` to check if the first number is smaller than or equal to the second number.
- demo_code: "age = {ask} 'How old are you?'\n{if} age >= 14\n {print} 'You are older than me!'"
explanation: We use the `>=` to check if the first number is bigger than or equal to the second number.
name: Bigger or equal
15:
- demo_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
explanation: We can use the `{while}` loop with not equal.
name: '{while}'
- name: Smaller {while}
demo_code: "count = 1\n{while} count < 3\n {print} 'We do this ' 3 - count ' more times'\n count = count + 1\n{print} 'We are done'"
explanation: We can also use the `{while}` loop with `<` and `>`.
142 changes: 142 additions & 0 deletions content/cheatsheets/cy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,145 @@
fruit = ['banana', 'apple', 'cherry']
random_fruit = fruit[{random}]
{print} random_fruit
3:
- name: Choose random
explanation: Choose a random word from a group with `{at}` and `{random}`.
demo_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}"
- demo_code: "animals {is} cow, cat\n{add} dog {to_list} animals"
explanation: '`{add}` an item `{to_list}` a list.'
name: '{add}'
- explanation: '`{remove}` an item `{from}` a list.'
demo_code: "animals {is} cat, dog, cow\n{remove} dog {from} animals"
name: '{remove}'
14:
- explanation: We use the `<` to check if the first number is smaller than the second number.
name: Smaller
demo_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'"
- demo_code: "age = {ask} 'How old are you?'\n{if} age > 13\n {print} 'You are older than me!'"
name: Bigger
explanation: We use the `>` to check if the first number is bigger than the second number.
- name: Equal
demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer == 25\n {print} 'That is correct!'"
explanation: We use the `==` to check if two things are the same.
- explanation: We use the `!=` to check if two things are not the same.
name: Not equal
demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer != 25\n {print} 'That is not correct!'"
- demo_code: "age = {ask} 'How old are you?'\n{if} age <= 12\n {print} 'You are younger than me!'"
name: Smaller or equal
explanation: We use the `<=` to check if the first number is smaller than or equal to the second number.
- demo_code: "age = {ask} 'How old are you?'\n{if} age >= 14\n {print} 'You are older than me!'"
explanation: We use the `>=` to check if the first number is bigger than or equal to the second number.
name: Bigger or equal
1:
- name: '{print}'
demo_code: '{print} Hello welcome to Hedy!'
explanation: Print something with `{print}`.
- name: '{ask}'
demo_code: '{ask} What is your favorite color?'
explanation: Ask something with `{ask}`.
- demo_code: "{ask} What is your favorite color?\n{echo} so your favorite color is"
name: '{echo}'
explanation: Repeat something using `{echo}`.
- name: '{print} emojis'
demo_code: '{print} 🙋 🌍 ❗'
explanation: Print an emoji with `{print}`.
- demo_code: '{forward} 100'
explanation: Draw a line with `{forward}`.
name: '{forward}'
- demo_code: "{forward} 25\n{turn} {left}\n{forward} 25\n{turn} {right}"
explanation: Turn the drawing turtle with `{turn}`.
name: '{turn}'
4:
- explanation: Print exactly using quotation marks.
name: '{print}'
demo_code: "{print} 'Hello welcome to Hedy.'"
- name: '{is}'
demo_code: "name {is} Hedy\n{print} 'my name is ' name"
explanation: Give a name to some text and `{print}` without quotation marks.
- explanation: Ask something with `{ask}`.
demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'"
name: '{ask}'
8:
- name: '{print}'
explanation: Print something. Remember to use a quotation mark for literal printing.
demo_code: "{print} '5 times 5 is ' 5 * 5"
- name: '{ask}'
demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'"
explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines.
- name: '{repeat} with turtle'
explanation: Repeat multiple lines.
demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50"
- name: '{pressed}'
explanation: Check whether a given key on the keyboard is `{pressed}`.
demo_code: "{if} a {is} {pressed}\n {print} 'You pressed A!'\n{else}\n {print} 'You pressed another key!'"
18:
- name: '{print}'
explanation: After `{print}` you need to use parentheses.
demo_code: "{print}('hi!')"
- name: '{range}'
explanation: After `{range}` you need to use parentheses.
demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)"
- demo_code: "name = 'Hedy'\n{print}('my name is ', name)"
explanation: With `{print}` you need to use parentheses and commas if you print more items.
name: '{print} with var'
- explanation: Use `{input}` instead of `{ask}` to ask something.
name: ask something with {input}
demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)"
13:
- explanation: Two parts both need to be correct.
name: '{and}'
demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {and} answer2 {is} 4\n {print} 'Both answers are correct!'\n{else}\n {print} 'At least one answer is wrong!'"
- name: '{or}'
explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine.
demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {or} answer2 {is} 4\n {print} 'At least one answer is correct!'\n{else}\n {print} 'Both answers are wrong!'"
9:
- name: '{if} with multiple lines'
demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20\n {print} 'Well done!!'\n {print} 'The answer is indeed' answer\n{else}\n {print} 'Wrong'\n {print} 'The answer is 20'"
explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines.
- explanation: Repeat multiple lines.
name: '{repeat} with turtle'
demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50"
17:
- explanation: '`{elif}`'
demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'"
name: '{elif}'
- name: '{print}'
demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'"
explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement!
- explanation: We need to do the same with all of our `{if}` statements.
name: '{if}'
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'"
15:
- demo_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
explanation: We can use the `{while}` loop with not equal.
name: '{while}'
- name: Smaller {while}
demo_code: "count = 1\n{while} count < 3\n {print} 'We do this ' 3 - count ' more times'\n count = count + 1\n{print} 'We are done'"
explanation: We can also use the `{while}` loop with `<` and `>`.
7:
- explanation: Print exactly using quotation marks.
name: '{print}'
demo_code: "{print} 'Hello welcome to Hedy.'"
- name: '{ask}'
explanation: Ask something with `{ask}`.
demo_code: "color = {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'"
- explanation: Make a choice with `{if}`.
name: '{if}'
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'"
- demo_code: '{repeat} 3 {times} {forward} 10'
explanation: Repeat a line of code with `{repeat}`.
name: '{repeat} with turtle'
10:
- name: '{print}'
demo_code: "{print} '5 times 5 is ' 5 * 5"
explanation: Print something. Remember to use a quotation mark for literal printing.
- explanation: Print all things in a list.
name: '{for} with a list'
demo_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
11:
- demo_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
explanation: We can use `{for}` with a `{range}`.
name: '{for} loop'
- name: '{ask}'
demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'"
explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines.
23 changes: 23 additions & 0 deletions content/cheatsheets/fi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,26 @@
fruit = ['banana', 'apple', 'cherry']
random_fruit = fruit[{random}]
{print} random_fruit
17:
- name: '{elif}'
explanation: '`{elif}`'
demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'"
- name: '{print}'
demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'"
explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement!
- explanation: We need to do the same with all of our `{if}` statements.
name: '{if}'
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'"
18:
- name: '{print}'
explanation: After `{print}` you need to use parentheses.
demo_code: "{print}('hi!')"
- name: '{range}'
explanation: After `{range}` you need to use parentheses.
demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)"
- demo_code: "name = 'Hedy'\n{print}('my name is ', name)"
explanation: With `{print}` you need to use parentheses and commas if you print more items.
name: '{print} with var'
- name: ask something with {input}
explanation: Use `{input}` instead of `{ask}` to ask something.
demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)"
30 changes: 30 additions & 0 deletions content/cheatsheets/he.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,33 @@
fruit = ['banana', 'apple', 'cherry']
random_fruit = fruit[random]
{print} random_fruit
17:
- name: '{elif}'
explanation: '`{elif}`'
demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'"
- demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'"
name: '{print}'
explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement!
- name: '{if}'
explanation: We need to do the same with all of our `{if}` statements.
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'"
18:
- explanation: After `{print}` you need to use parentheses.
name: '{print}'
demo_code: "{print}('hi!')"
- name: '{range}'
explanation: After `{range}` you need to use parentheses.
demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)"
- demo_code: "name = 'Hedy'\n{print}('my name is ', name)"
explanation: With `{print}` you need to use parentheses and commas if you print more items.
name: '{print} with var'
- explanation: Use `{input}` instead of `{ask}` to ask something.
name: ask something with {input}
demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)"
15:
- demo_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
explanation: We can use the `{while}` loop with not equal.
name: '{while}'
- name: Smaller {while}
demo_code: "count = 1\n{while} count < 3\n {print} 'We do this ' 3 - count ' more times'\n count = count + 1\n{print} 'We are done'"
explanation: We can also use the `{while}` loop with `<` and `>`.
Loading
Loading