This document is a summer holiday worksheet for Class XI students focusing on the introduction to Python programming. It includes multiple-choice questions, short answer questions, and programming exercises related to Python concepts such as data types, identifiers, and error detection. The worksheet aims to assess students' understanding of Python syntax and programming fundamentals.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views3 pages
CS WS 3 Intro.python Programming.docx
This document is a summer holiday worksheet for Class XI students focusing on the introduction to Python programming. It includes multiple-choice questions, short answer questions, and programming exercises related to Python concepts such as data types, identifiers, and error detection. The worksheet aims to assess students' understanding of Python syntax and programming fundamentals.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3
Summer Holiday Worksheet-3
Topic: Introduction to Python programming
Name of the student: Class/Sec: XI/…… Multiple-choice questions: 1. Which of the following are not valid string/strings in python? a) “Hello” b) ‘Hello’ c) “Hello’ d) “123” 2. Which of the following is not a valid identifier? (a) Mybook 1 (b) @book (c) _book (d) Book23 3. Choose the correct syntax for printing values in the same line. (a) print(a,b) (b) print (a, end=” ”,b) (c) print (a,end=”$”,b) (d) print(a)print(b) 4. What is the maximum possible length of an identifiers? (a) 16 (b) 32 (c) 64 (d) None of the above 5. What do we use to define a block of code in Python language? (a) Key (b) Brackets (c) Indentation (d) None of these 6. Python is a ______________ Language. (a) Low level (b) Procedural (c) Object oriented (d) Difficult 7. A ______ is a word having a special meaning reserved by a programming language. (a) Token (b) Keyword (c) Identifier (d) Variable 8. Which of the following is the correct extension of the Python file? a) .python b) .pys c) .py d) .p 9. What will be the value of the following Python expression? 1 + 10 % 4 a) 3 b) 2 c) 11 d) 1 10. Which of the following character is used to give single-line comments in Python? a) @ b) # c) ! d) /* 11. What will be the output of the following Python program? i=1 while i < 5: i += 1 print(i) a) 5 b) 0 c) 1 d) none of the mentioned 12. run time error in a code means: (a)You have not used correct logic. (b) There was error while running the program. (c) There is an error with your typing and code structure (d) None of above. 13. Which of the following is not a core data type in Python programming? a) Tuples b) Lists c) Class d) Dictionary 14. What will be the output of the following Python code? x = 'abcd' for i in x: print(i.upper()) a) a B C D b) a b c d c) error d) A B C D 15. What will be the output of the following Python statement? >>>"a"+"bc" a) bc b) abc c) a d) bca Short answer type questions: 1. What are data types? How are they important? 2. What are immutable and mutable types? List immutable and mutable types of python. 3. What are tokens in Python? How many types of tokens are allowed in python? Exemplify your answer. 4. What will the result given by the following ? (a) type(6+3) (b) type(6-3) (c) type(6*3) (d) type(6/3) (e) type(6//3) 5. What are variables? How are they important for a program? 6. In Python, strings are immutable while lists are mutable. What is the difference? 7. What is a cross-platform software? 8. What is the difference between implicit type conversion and explicit type conversion? 9. What is debugging? 10. Differentiate between “break” and “continue” statement. 11. What is the purpose of range function? Give example. 12. Write the advantages and disadvantages of Python programming language. Program based questions:
Error detection: Find error in the following code (if any), rewrite code, and underline each correction. a) b)