0% found this document useful (0 votes)
10 views2 pages

Comp CH 1 WS2

This document contains 10 questions about Python concepts like operators, data types, strings and basic programs. The questions cover topics like operator precedence, string operations, conditional expressions and converting between temperature scales.

Uploaded by

priya.akshay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Comp CH 1 WS2

This document contains 10 questions about Python concepts like operators, data types, strings and basic programs. The questions cover topics like operator precedence, string operations, conditional expressions and converting between temperature scales.

Uploaded by

priya.akshay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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