input
will return str
, so you need to compare choice
with '2'
or convert the user input to int
and then you can compare with 2
.Then to end the loop
choice
must become 'exit'
also, I must comment on excessive use of brackets - no need of brackets in cases like
("enter")
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs