print("Hello there, what is your name?")
name = input()
print( name +" have to go to a path you can see two paths infront. write either 1 or 2 ")
if path== 2:
print ("you have fell into deep well you have died")
if path== 1:
print ("you have encountered a weakened soldier and you kill him")
You can write it like this. This is what I have wrote after I saw your code.
When you submit your response on sololearn playground, please make sure to first write your name and enter your number on the second line.
Like it if you loved it. :))
If you want the input function run more than once,you can define your own function like "get_input",which include the input
function,then use the infinite loop as follow:
Every time an input and output execution finished,it will wait another input.
If you finished the Python3 OOP course here,you will learn.
In the name of kindly generous GOD
for errors fixing ,you should:
1-import random just first of code and once
2-the input() function returns a value it has a string type in default.So we convert it string(str) to int by int(...) function.
because , you are getting (path)a value of
Int type!✓ path=int(input()) ✓