English

Find the errors from the given code. for i in 1 to 100 : printI

Advertisements
Advertisements

Question

Find the errors from the given code.

for i in 1 to 100 :
     printI
Very Short Answer
Advertisements

Solution

Errors: Python does not use 1 to 100; use range(). Also use the same variable name i, and Python 3 print().

shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Review of Phython - EXERCISE [Page 26]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 1 Review of Phython
EXERCISE | Q 8. b. | Page 26
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×