My issue
What Is Time Limit Exceeded
My code
# update the code below to solve the problem
n = int(input())
I=1
while I in range (1,11):
if I == n:
continue
print(I)
Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone
You have to use for loop not while. if you are using the while loop you have to provide a condition inside bracket and the statement inside the loop gets executed only when the condition is true also you have to keep incrementing the value of āIā inside the while loop. not incrementing the value of i causes Time limit exceeded error.
For this problem a simple for loop should work.
n = int(input())
for i in range (1,11):
if i == n:
continue
print(i)