Dec-12-2021, 06:16 PM
Hi New_coder,
The best way to find out if it works: just run the code and see if it does what you want. If you don't understand why it does not work: just ask us in this forum.
A few things I would like to say:
I understand the code should repeat asking commands. I know only 2 ways to repeat code blocks:
There are more problems in your code, but please just run it and you will find them yourself. It is the best way to learn.
The best way to find out if it works: just run the code and see if it does what you want. If you don't understand why it does not work: just ask us in this forum.
A few things I would like to say:
input = ("")NEVER USE THE NAME OF A KEYWORD OR A BUILT-IN AS A NAME OF A VARIABLE! After that line you will not be able to use the
input()
function anymore.I understand the code should repeat asking commands. I know only 2 ways to repeat code blocks:
while
and for
. I don't see an elegant way to get the same result in an other way.There are more problems in your code, but please just run it and you will find them yourself. It is the best way to learn.