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

WORKSHEET-2

CH-PYTHON REVISION TOUR -1


Can you guess the output?
1 C = -11%4
print(C)
2 Write 2 advantages and disadvantages of Python programming language
Identify the valid and Invalid identifiers names:
3
Emp-Code, _bonus, While, SrNo. , for, #count, Emp1, 123Go, Bond007@
Identify the type of literals for each:
(i) 123
(ii) “Hello”
4 (iii) “Bye\nSee You”
(iv) “A”
(v) 345.55
(vi) 10+4j
(vii) 0x12
What is the size of each string?
5 (i) “Python”
(ii) “Learning@\nCS”
(iii) “\table”
Output of :
(i) True + True =
(ii) 100 + False =
6
(iii) -1 + True =
(iv) bool(-1 + True) =
Output of
(i) 2 * 7 =
(ii) 2 ** 7 =
7 (iii) 2**2**3 =
(iv) 17 % 20 =
(v) not(20>6) or (19>7) and (20==20) =

Output of :
a,b,c = 20,40,60
8 b+=10
c+=b
print(a,b,c)
9 Write a program to enter 2 number and find sum and product
Write a program to enter temperature in Fahrenheit and convert it
10
in Celsius.

You might also like