-4

Hi guys i have this code

if s == 10: 
S   ="A"    
elif s ==   11 :    
S   ="B"    
elif s ==   12 :    
S   ="C"    
elif s ==   13 :    
S   ="D"    
elif s ==   14 :    
S   ="E"    
elif s ==   15 :    
S   ="F"    
else:
S   =s

and i have an error can You Help Me

S ="A" ^ expected an indented block

i used an other command But Error Is Still There Can any one Help Me

1 Answers1

-1

You need to use indentation (spaces or tabs)(stay consistent in use) to tell Python what's part of the if-statement and what isn't. As of now, there's nothing that could be run if the if-statement evaluates to true. Also, the S = are outside of those loops because of that.

if s == 10: 
    S   ="A"    

This is what you most likely want.

Katembers
  • 103
  • 1
  • 1
  • 8