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 :)

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.

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

Leave a Reply

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