'an error in my code with the word (print)
The problem is I typed print and it did nothing, I don't know what the issue is because this is my 3rd time writing a code, I don't think it's a good idea to continue coding with an error not fixed yet, here's the code:
name_lastname = input("Hello, what is your name and last name ?")
voulanteer_q = input("Mr/Mrs "+name_lastname+ " do you want to be a voulanteer ? yes/no \n>")
voulanteer_q = ""
if voulanteer_q == "yes":
print("where ? entrance gate ? gift shop ? painting ?")***
Solution 1:[1]
Remove the line voulanteer_q = "", as it will override the user input and your logic won't work. The line above with voulanteer_q = input(.. will contain your user's input.
Your updated code should look like below
name_lastname = input("Hello, what is your name and last name ?")
voulanteer_q = input("Mr/Mrs "+name_lastname+ " do you want to be a voulanteer ? yes/no \n>")
if voulanteer_q == "yes":
print("where ? entrance gate ? gift shop ? painting ?")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
