Test Post – Python Code

Using <pre />

print("Please enter your name")
name = input()
if name == "Bob":
    print("Hello " + name)
else:
    print("Sorry only bob allowed " + name)

Using Plugin :)

1
2
3
4
5
6
print("Please enter your name")
name = input()
if name == "Bob":
    print("Hello " + name)
else:
    print("Sorry only bob allowed " + name)

What line contains the conditional statement? You can see the answer below.

Leave a Reply

Your email address will not be published. Required fields are marked *