0

I was in the middle for a basic race selection input.

userInput = input
print ('I choose a(n)', userInput)
if userInput is ('Human'):
    input ('I like Humans, help that I am one')    
if userInput is ('Orc'):
    print ('Hate orcs, I dont like green :(')
if userInput is ('Android'):
    print ('Robots are cool, so by theory Androids are too')
else:
    print ('Try Again')

but the output is weird...

I choose a(n) <built-in function input>

Try Again

See the problem with the script? I think it does not wait for the input and since there is no input, its just says 'Try Again', but I am not totally sure on how to fix that. This is probably an easy fix, but I honestly don't know :(

0

1 Answer 1

2

Try

userInput = input()

That is input() is a function call

Sign up to request clarification or add additional context in comments.

1 Comment

@Samuel Quansah if my answer resolved your issue please accept it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.