You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here below is a code for level 12 that should be working. If you enter that code, then run it and ask for an étoile of color 'rouge' it generates a 'String index out of range' error.
However, if you replace the = signs of the three last si with est it then works. It's also the case, if you replace, in the last if, the word 'étoile' by 'etoile' (without the accentuated character)
Paste the Hedy code & level
The following code should run at level 12.
définis dessine_un_carré
répète 4 fois
avance 20
tourne 90
avance 20
définis dessine_un_triangle
répète 3 fois
avance 20
tourne 120
avance 20
définis dessine_un_étoile
répète 5 fois
avance 20
tourne 144
avance 20
couleur blanc
tourne -90
avance 300
tourne 180
pour i dans intervalle 1 à 5
couleur gris
avance 100
forme = demande "Quelle forme veux-tu ensuite dans ton bracelet ?"
couleur = demande "Dans quelle couleur ?"
couleur couleur
si forme = "carré"
appelle dessine_un_carré
si forme = "triangle"
appelle dessine_un_triangle
si forme = "étoile"
appelle dessine_un_étoile
Add a screenshot (optional)
What machine and browser you were using (optional)
If the issue concerns things in the website, let us know:
What computer you are using : Mac
What browser you were using : Firefox
The text was updated successfully, but these errors were encountered:
Felienne
changed the title
🪲 code in french generating an error 'string index out of range' for no apparent reason
🪲 code in french generating an error 'string index out of range'
Apr 3, 2024
…5352)
Fixes#5341
The prefix function convert_numerals now has support for empty strings and None values.
**How to test**
Run Hedy locally and navigate to level 12 and run:
```
for i in range 1 to 3
form = ask "What form?"
color = ask "What color?"
if form is 'test'
print 'test'
```
Once the program is running do the following:
1. Supply any value to the first input, e.g. `a`
2. Supply any color to the second input, e.g. `red`
3. Cancel the program by clicking the 'Stop program' red button
4. Start the program again
5. Supply any value to the first input, e.g. `b`
6. Supply any color to the second input, e.g. `red`
7. Check that there is no 'string index out of range' error
Describe the bug
Here below is a code for level 12 that should be working. If you enter that code, then run it and ask for an
étoile
of color 'rouge' it generates a 'String index out of range' error.However, if you replace the
=
signs of the three lastsi
withest
it then works. It's also the case, if you replace, in the last if, the word 'étoile' by 'etoile' (without the accentuated character)Paste the Hedy code & level
The following code should run at level 12.
Add a screenshot (optional)
What machine and browser you were using (optional)
If the issue concerns things in the website, let us know:
The text was updated successfully, but these errors were encountered: