+ 1

How I “restart” a code? Like, when the code finish, how I return to the beginning and repeat the process with other user data?

For example in this code, when I write a, b,c and gives me the result. how I do to put another numbers without running the code again? https://code.sololearn.com/ck5etOhJxKVi/?ref=app

18th Sep 2018, 9:41 PM
Artur Spain 🇪🇸
4 Respuestas
+ 13
Unfortunately, you can't do it in the Code Playground. You can implement asking for an input inside of a for cycle and try it on your local machine.
18th Sep 2018, 10:26 PM
Igor Makarsky
Igor Makarsky - avatar
+ 1
You could put the entire script inside a function, then run the function again to restart the code.
18th Sep 2018, 11:34 PM
James
James - avatar
0
Igor Makarsky yes I know I can’t so it in the code playground :(. But how would I write it?
19th Sep 2018, 6:40 AM
Artur Spain 🇪🇸
0
James maybe, I will try both
19th Sep 2018, 6:40 AM
Artur Spain 🇪🇸