Page 345 - Artificial Intellegence_v2.0_Class_9
P. 345
F. Find the output of the given code:
1. A=10 2. I = 10; J = 50
for i in range(2, A, 2): if (I > 10 and J < 100):
print(A,i,sep='2',end='*') print(I, J)
else:
print(J)
3. for i in range(5):
if i%2==0:
print(i, end="*")
SECTION B (Subjective Type Questions)
A. Short answer type questions:
1. Name the two coding programs available in CodeCombat.
2. Why are flowcharts more preferred than algorithms?
3. Can we write more than one algorithm for the same problem? Explain.
4. What is the meaning of selection flow in control structures?
5. How can we create a multi-line string in Python?
6. What is a use of print( ) function? Give a few examples to support your answer.
7. What are variables? Why are they important in any programming language?
8. How is floor division different from normal division?
9. What are the rules for naming of variables and constants? [CBSE Handbook]
10. What is the meaning of Sequential Programming?
11. What is nested if statement?
12. Why is it necessary to give step value in while loop?
13. Why while loop is called entry-controlled loop?
14. What is the use of sort( ) function of a list?
15. What are the key features of python? Mention various applications along with it. [CBSE Handbook]
16. What is the difference between pop( ) and remove( ) functions?
17. What will be the output of the following statement?
print([1, 2, 6] < [1, 2, 5])
B. Long answer type questions:
1. Give three differences between an algorithm and a flowchart.
2. Explain three symbols used in flowcharts.
3. Explain the first two steps involved in Computer Problem Solving.
4. Explain with example the three control structures.
5. Explain mathematical operators with examples.
6. What are comments in python? List down the various types of comments. [CBSE Handbook]
Introduction to Python 343

