Rewrite the following code in Python after removing all syntax error(s).
Underline each correction done in the code.
Value=30
for VAL in range(0,Value)
If val%4==0:
print (VAL*4)
Elseif val%5==0:
print (VAL+3)
else
print(VAL+10)
Answers
Answered by
0
Answer:
Explanation:
Value=30
for VAL in range(0,Value)
If val%4==0:
print (VAL*4)
Elseif val%5==0:
print (VAL+3)
else
print(VAL+10)
Answered by
1
Answer:
CORRECTED CODE:
Value=30
for VAL in range(0,Value) : # Error 1
if val%4==0: # Error 2
print (VAL*4)
elif val%5==0: # Error 3
print (VAL+3)
else: # Error 4
print(VAL+10)
Similar questions
Physics,
2 months ago
Science,
2 months ago
English,
10 months ago
Business Studies,
10 months ago
English,
10 months ago