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
line1
try:
testCases = int(input("Enter the number of test cases: ").strip())
# Rest of your code using testCases
except ValueError:
print("Invalid input. Please enter a valid integer.")
Activity
OmkarPathak commentedon Aug 23, 2020
@roop0, can you please provide more details, like what is the filename?
Raizo-Jr commentedon Dec 31, 2020
line 1, in
testCases = int(input())
ValueError: invalid literal for int() with base 10:
VittalKumar23 commentedon Oct 9, 2023
line1
try:
testCases = int(input("Enter the number of test cases: ").strip())
# Rest of your code using testCases
except ValueError:
print("Invalid input. Please enter a valid integer.")