Note:Error is displaying in this code, please correct it
Enter the number of societies:Keep the number of people in societies:
Traceback (most recent call last):
File "main.py", line 4, in <module>
num_people = int(input('Keep the number of people in societies:'))
ValueError: invalid literal for int() with base 10: '\r'
try:
num_people = int(input('Keep the number of people in societies:'))
except ValueError:
print('You can only enter numbers')
Comments
Leave a comment