Python - im new and cant find the error in my code

health = 100
currency = 400

startscript = "Inferno Tech Studios brings you: TextWorld"
#username input
uname = input("Username:",)
print("Hello",  uname + ".",)

startbutton = input("Type start to play, leave to quit. [ENTER/LEAVE]")
if startbutton == "LEAVE":
if startbutton == "ENTER":
    choice1 = ("You get home from school and your icecream is gone. You can SCREAM for more or SHRUG it off. [SCREAM/SHRUG]')

(note this not complete , but this shouldnt effect the code right?)

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


Your code does not run, because you have an error on the last line. You did not properly close your string. Strings should end with the same type of quotation mark as they start. Yours does not.

So everything else is fine? sorry if this is annoying but this is my last question.

I am not sure how to answer your question, because all I can say is that it will execute now instead having an error. Was there something else you wanted me to validate? I do not know what your code is supposed to do, so I can not comment on any functionality it may or may not be doing correctly.

i want it to print startscript,
have the the user input username,
then print their username,
then after that have the user type start to play or leave to quit,
if they type leave i want the program to quit,
if they type enter, i want it to print choice 1

if those are your requirements, then it seems the only line of code you are missing is print(choice1) after you assign the string to the choice1 variable.