Class – XII
Important questions for COMPUTER (SA-1) EXAMINATION
|
What
are tokens in python? How many types of tokens are allowed in python?
Exemplify your answer. |
|
How
are keywords different from identifiers? |
|
Can
non graphic characters be used and processed in Python? How? Give examples to
support your answer. |
|
How are floating constants represented in Python? Give
example to support your |
|
What
all components can a python program contains ? |
|
How many times is the following loop
executed? |
|
What is the difference
between ‘/’ and ‘//’ ? |
|
Give the output of the
following statements : >> str=‘Hello Python’ >>> str.istitle()
|
|
Name the modules to which the following func-tions belong: 1.
Uniform () 2.
fabs () |
|
Out of the following,
find the identifiers, which cannot be used for naming Variable or Functions
in a Python program: |
|
SECTION - C
(THREE MARK QUESTIONS) |
|
Out
of the following, find those identifiers, which cannot be used for naming
variable or Function in a Python program: |
|
What
are operators ? what is their function? Give examples of some unary and
binary operators. |
|
What
are variable? How are they important for a program? |
|
Name the
Python Library modules which need to be imported to invoke the follwing
functions : 1. sqrt() 2. dump() |
|
What is the difference
between input() and raw_input()? |
|
How many times will Python execute the code inside the following while
loop? You should answer the question without using the interpreter! Justify
your answers. i = 0 while i < 0 and i > 2 : print “Hello ...” i = i+1 |
|
Differentiate between
the round() and floor() functions with the help of suitable example. |
|
Convert the following for loop into while loop, for i
in range (1,100): if i % 4 == 2 : print i, “mod”, 4 , “= 2”
|
|
SECTION - D
(FIVE MARK QUESTIONS) |
|
Fill
in the missing lines of code in the following code. The code reads in a limit
amount and a list of prices and prints the largest price that is less than
the limit. You can assume that all prices and the limit are positive numbers.
When a price 0 is entered the program terminates and prints the largest price
that is less than the limit. # Read the limit |
|
Write a generator function generatesq
() that displays the squareroots of numbers from 100 to n |
|
Write a program to convert binary to
decimal |