22.2 Pure Gold | Sololearn: Learn to code for FREE!


22.2 Pure Gold

Not sure what I am doing wrong. It says invalid syntax and points to the colon? purity = float(input() if purity >=91.7 and purity <=99.9: print("Accepted")

5/21/2021 7:23:55 PM

Reagan Keith

4 Answers

New Answer


you just missed the ) after the input().


often you have to search error before the line pointed by the error: here error show line 2 because expecting a closing parenthesis: the one opened by float() call...


All the test cases passed except #5, but its locked so i cant see it. Not sure what else is wrong


the correct code covering all 5 cases: purity = float(input()) if purity >= 91.7: print("Accepted") if purity == 99.9: print("Accepted")