The document contains a revision worksheet with 10 questions about Python concepts like if/else statements, membership operators, loops, and basic math operations. Students are asked to define features of Python, write programs to print tables and check divisibility, and evaluate code snippets using comparison, logical, and mathematical operators. It also asks about the two types of comments in Python.
The document contains a revision worksheet with 10 questions about Python concepts like if/else statements, membership operators, loops, and basic math operations. Students are asked to define features of Python, write programs to print tables and check divisibility, and evaluate code snippets using comparison, logical, and mathematical operators. It also asks about the two types of comments in Python.
The document contains a revision worksheet with 10 questions about Python concepts like if/else statements, membership operators, loops, and basic math operations. Students are asked to define features of Python, write programs to print tables and check divisibility, and evaluate code snippets using comparison, logical, and mathematical operators. It also asks about the two types of comments in Python.
PYTHON ANSWER THE FOLLOWING QUESTIONS 1. How is if statement different from if…else statement? 2. What is the use of membership operator in Python? 3. Write any two features of Python that make it user friendly. 4. What is the difference between a=10 and a==10? 5. Answer in one word. a) Mention the other name for iterative statements. ____________ b) Name the two types of Iterative statements. ______________ c) Name the two membership operators in Python. ____________ d) Which function is used to check the range in a loop? ____________ 6. What do you mean by Iterative statements? Give an example. _____________ 7. Write a python program print table of a given number. 8. Write a python program to check if a number is divisible by 10 or not. 9. Find the output for the following code fragments. a) a=10 b=14 print(a>100 and b<100) b) a=5 if a >5: print(“The number is greater than 5”) else: print(“The number is lesser than 5”) c) a=30 b=4 print(a/b) print(a//b) print(a*b) print(a**3) d) a=1 b=2 print(a==1 or b==5) e) x=10 y=10 print(x==y and x<20)
10. What are the two types of comment line in python.