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
The following code ran in 2 different notebooks gives two different results. One of them is duplicating the printing command as you can see (in the screenshots attached)
and the other one is perfectly fine. And yes, I've restarted the kernel and cleaned all outputs before running both. Can you help please? I've spent tons of time around this and cannot figure out what's wrong ...
def user_choice():
choice ='WRONG'
within_range = False
while choice.isdigit() == False or within_range == False:
choice = input("Please enter a number (0-10): ")
if choice.isdigit() == False:
print("Sorry that is not a digit!")
if choice.isdigit() == True:
if int(choice) in range(0,11):
within_range = True
else:
print("Sorry, that number is not between 0-10.")
within_range = False
return int(choice)`
The text was updated successfully, but these errors were encountered:
I ran into this issue today as well. Initially I thought it's logging's issue, but with debugger it's fine. I also found that if I run the cell with breakpoints, or run it for the second time, it's not duplicating.
I assume the code reading stderr/stdout has bug in it, but I don't have time to fix it on my own
The following code ran in 2 different notebooks gives two different results. One of them is duplicating the printing command as you can see (in the screenshots attached)
![Captura de ecrã 2020-11-29, às 21 59 34](https://user-images.githubusercontent.com/75224987/100554690-3de38d80-328e-11eb-981e-19772a42d9c9.png)
![Captura de ecrã 2020-11-29, às 21 59 53](https://user-images.githubusercontent.com/75224987/100554692-4045e780-328e-11eb-81a9-80d08560bd85.png)
and the other one is perfectly fine. And yes, I've restarted the kernel and cleaned all outputs before running both. Can you help please? I've spent tons of time around this and cannot figure out what's wrong ...
def
user_choice():The text was updated successfully, but these errors were encountered: