I can’t figure out what I did wrong here. Could someone help me get through this. The question is " JASSIGNMENTS
my code:
x = int(input())
for i in range(x):
y = int(input())
if y >= 7:
print(“No”)
else:
print(“Yes”)
I can’t figure out what I did wrong here. Could someone help me get through this. The question is " JASSIGNMENTS
my code:
x = int(input())
for i in range(x):
y = int(input())
if y >= 7:
print(“No”)
else:
print(“Yes”)
If he starts at exactly 7 PM, then also its possible. Any value greater than 7 will lead to not possible case.
Hence, the inequality should be:
y>7 → No
else Yes
So i just have an “=” and it should just be “>”. Thank you!
Yes, instead of “>=” it should be only “>” because 7 is a possible case when he can complete the assignment.
y>=7 is wrong ringt answer is if y>7 -No
else - yes