0

So I'm trying to make a game which takes your level, multiplies it by 5, divides the product by 25, then multiplies that by 100, to get your attack variable. The code for default looks like below;

level = 1
atk = ((level * 5) / 25) * 100

Now, if following basic math, that would make ((1*5)/25)*100). That means the answer should be 20. Python, however, reports 0. What am I doing wrong?

user2357112
  • 260,549
  • 28
  • 431
  • 505
EarthToAccess
  • 71
  • 1
  • 10

1 Answers1

0

Make the level as a real number so that the ark also will be a real,

this is a python magic lol

level=1.0 atk=(level*5/25)*100 print atk

MANOJ AP
  • 56
  • 5