Class - 11 (Science + Commmerce) Test - 3 - Python

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

CLASS – 11TH [SCIENCE + COMMMERCE]

TEST – 3 - PYTHON

1) Differentiate between a keyword and a variable.


2) Define function and its argument.
3) Write the rules for defining variables.
4) Write a program to obtain temperature in Celsius and convert it into Fahrenheit using
formulae ( f=c*9/5+32)
5) Write a function to calculate and display the selling price of an item.
6) Write a function with argument to convert the entered number of months into years and
remaining months. Example - enter months – 32
There are 2 years and 8 months.
7) If x=25.45 Write the code to print –

I. Its identity. II. Its type III. Its value.

8) X=3+5j. Write code to print its real and imaginary part


9) Write the answer as required –

a) To find ASCII value d) Write one punctuator.


b) To get character encoded by e) Print this - 10@20@30
ASCII code numbers f) In a+b, sign + is unary or
c) Write literals in expression- binary.
str=”simar”

10) Write the output-

1) 27/5 9) 10<25 or 30>40


2) 27//5 10) 20**=2
3) 27%5 11) Print(print(“double”))
4) 9**2 12) Print(float(input(“value: - ”)))
5) “hello”*3 13) 24<<2
6) “aa”<”ab” 14) 25>>2
7) 20!=20 15) 30^28
8) 10<25 and 30>40 16) Print (10,20,30,sep=””)

11) Write reason why these variable name are invalid-4cast, sur name,D.O.B,mid@name,and.
12) What will be the output – x , y=2, 6
x , y=y, x+2
print (x, y)

You might also like