+ 1

(def) help

def hero(): a1 = input( "Name/ ") print("hello Hero" + a1) set_hp: str = '25' set_at = '1' print("hp = " + set_hp) print("attack = " + set_at) print(hero()) # how do I get (a1) out of (def hero) # print ((a1) + dam) # name -2

15th Sep 2020, 7:09 PM
UNSC WARSAW
UNSC WARSAW - avatar
2 Answers
+ 3
in addition to Coder Kitten : a1="" def hero() : global a1 ....
15th Sep 2020, 7:26 PM
Oma Falk
Oma Falk - avatar
0
thx
15th Sep 2020, 7:38 PM
UNSC WARSAW
UNSC WARSAW - avatar