Hopefully you don't mind the foreign language in prints. Also I started python last week so sorry if the code is bad and unpractical.
Okay so what im trying to do is have a player health and player damage multiplied by a random number between 1-10 and then subtract the result from the enemy health (the easy health variable) and then do the same the other way around (playerhealth-easydamage*random) And then if the enemy's or players health reaches 0 a message about the winner gets printed out. I haven't gotten to that part yet. My problem is i only either got File stdin syntax error or the out put is literally "None"
def fightgame():
Player_Health=150
Player_Damage=7
Easy_Health=120
Easy_Damage=5
for _ in range(5):
x= random.randint(1,10)
def Easy_PT():
Pdamage = x * Player_Damage
Easy_Health - Pdamage
if Easy_Health != 0:
print ("Vyhral si.")
else:
print ("Boss má " +Easy_Health+ "životov.")
def Easy_FT():
Edamage = x * Easy_Damage
Player_Health - Edamage
if Player_Health != 0:
print ("Prehral si.")
else:
print ("Máš " +Player_Health+ "životov.")
print(fightgame())
if __name__ == "__main__":
fightgame()