What does the following code output?

x = -10
if x * 2 > x:
    print("Greater")
else:
    print("Less or Equal")

1
2
2

Less or Equal

What would the following code output?

def foo(x, array):
    if x in array:
        return True
    else:
        return False

print(foo(1, [1, 2, 3]))
print(foo(1, [2, 3]))
print(foo(1, ['1', 2, 3]))

1
2
3
1
True 
False
False

Check the code that has a correct syntax.

1
2
3
4
5
5
def check_username(username):
    if len(username) > 4:
        return "Succesful!"
    else:
        return "Try another username"

What is true about the following code?

if isinstance(x, int) or isinstance(x, float) or x=='1':
    print("Valid type!")
else:
    print("Not valid!")


1
2
3
1

The code prints out Valid type! if x has a value of '1'.