Hey whats up, I'm really new and really a beginner to this so sorry if this is a really dumb question but... I'm trying to make a program that loops and calculates the height of a ball and it is divided by 2 every time it bounces. I want to make the program stop when the height is at 0.5 but when I run the program it just keeps repeating zeroes without stopping as if it were an infinite loop(but I did include the if-break so I dont know why it would be infinite). Also, I dont want any decimal points to be displayed. So the program would end showing only one zero as the output. Can anyone help? I've included the code below
Thanks! I was so caught up with the programming that I didnt do the math in my head lol what I actually did was for the "if" i changed it to (height <= 0.5) instead and it worked much better. Thanks again!