Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Today i figured out how to make a function that reacts to a user input.
But the problem I have is how to have a muti answer. (it's for a puzzle game.)
Python
#the functions over here




#function end
print("You wake up in a small room, a door in front of you.")
print("A sofa behind you, and a desk and closet nere each other.")
print("What will you do?")

action = input("Input:")
#problem
func1(action)
func2(action)
#result

Input:func1
func1
func2

how do i make it to print one or two?
My dream:
input:func1
func1
---or
input:funct2
func2
-----
Please help me figure this out.

What I have tried:

putting it before the input, in the function, in a if statement, and youtube etc
Posted
Updated 7-Apr-18 22:49pm

1 solution

 
Share this answer
 
Comments
Member 13767746 8-Apr-18 12:34pm    
What do i need to look for?
Richard MacCutchan 8-Apr-18 12:44pm    
Start at the top of that page and see how using if, elif, else lists can test for multiple responses.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900