Please correct the error. There are syntax errors, logical errors and runtime errors.
1.
if x == y:
print('Equal')
2.
x = 'hello'
y = ['hello']
if x == y:
print('Equal')
3.
x = True
while x:
for x in list(range(0,10)):
print(x)
4.
myfunction(x, y):
return x + y
else:
print("Hello!")
if mark >= 50
print("You passed!")
if arriving:
print("Hi!")
esle:
print("Bye!")
if flag:
print("Flag is set!")
Thank you for the help!
x = y = 1
if x == y:
print('Equal')
x = 'hello'
y = ['hello']
if [x] == y:
print('Equal')
x = True
while x:
for x in list(range(0,10)):
print(x)
break
mark = 100
arriving = True
flag = True
def myfunction(x, y):
return x + y
print("Hello!")
if mark >= 50:
print("You passed!")
if arriving:
print("Hi!")
else:
print("Bye!")
if flag:
print("Flag is set!")
Comments
Leave a comment