0
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")
4 Antworten
+ 1
you just missed the ) after the input().
+ 1
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...
+ 1
All the test cases passed except #5, but its locked so i cant see it. Not sure what else is wrong
- 1
the correct code covering all 5 cases:
purity = float(input())
if purity >= 91.7:
print("Accepted")
if purity == 99.9:
print("Accepted")