+ 3

I cant run it and facing errore.What should I do?

num = input(":") if float(num)<0: raise ValueError("Negative!")

19th Jun 2019, 10:09 AM
Akil đŸ‡§đŸ‡©
Akil đŸ‡§đŸ‡© - avatar
3 RĂ©ponses
+ 4
There is an IndentationError because you have an extra space before if statement. num = input(":") if float(num)<0: raise ValueError("Negative!") Just remove extra space and your problem will be solved.
19th Jun 2019, 10:14 AM
Deepak Kumar
Deepak Kumar - avatar
+ 2
Tnx, elder
19th Jun 2019, 10:19 AM
Akil đŸ‡§đŸ‡©
Akil đŸ‡§đŸ‡© - avatar
0
num = input(":") if float(num)<0: raise valueerror("negative!")
25th May 2021, 12:10 PM
Madhavareddy
Madhavareddy - avatar