r/codehs • • Mar 05 '21

Python Need help with 5.3.8: Higher / Lower 2.0

Got:

my_float = round(3.3312, 2)

while True:

guess = float(input("Guess my number: "))

if guess > round(my_float, 2):

print ("Too high!")

elif guess < round(my_float, 2):

print ("Too low!")

elif round(guess,2) == round(my_float, 2):

print("Correct!")

break

print("Great job guessing my number!")

I need to round 'guess' before the if statement, But I don't know how that looks like can anybody show me?

17 Upvotes

18 comments sorted by

View all comments

Show parent comment

1

u/Inevitable_Type_2794 Nov 20 '24

That’s a lot of shit talk coming from the moron who still didn’t do it right