USN 1 6MLLLLI
B.M.S. COLLEGE OF ENGINEERING,
Autonomous Institute, Afiated to ViU
BENGALURU-19
Department of
Chemical Engineering
CONTINUOus INTERNAL EVALUATION (TEST-1)
Course Code:
Semester: 22C51PLPYPCourse Title: Introductlon to Python Programing_
Maximum Marks:
Faculty Handling the Course: Mr. DK, Mrs. TP, Dr.40RS,Date:
Or. SKB, Dr. CR,
common paper to all
Dr. NS, and Mr. RK -
the branches In physlcs &PLC cycle
Instructions
.First Five
Questions are compusoy
ssween Questlon 6 and 7
3. Missingg Data mavbe
Missing Data may be suitabilIty assumed
Mark COs PO
LIst the
ditferent operators used in pythoa programming Consider e 05
g epession ankd explain the nulcs ot
precelencc 1ollowcd in
grnming to evaluate the expression pyn0n
Epression:>*=(1 +2**3))/(4 5)
2 Constder the given a python list, remove all occurrence of 20
listl [5, 20, 15, 20, 25, S0, from the list, 0o
20] using suitable python progrann
5.
What is slice
operator? Ilastrate its syntax with a suitable cxampie in 0
strings.
. Wth a suitable example illustrate the
progrim grven below nnd
syntax of while loop. Analyze the 07 2
wnte ts
oulpul with and without break statement
lower 3
higher.40
tor nun in range (lower, bigber + DE
if num > l
for i in range (2, num):
tnurm i)0:
oncar
else:
print(num)
S. Wat
1s data Ype convesion? Writc a pythou
progam using data type
ConversiOn to convert a seT delincd emperanire
07
trom Fahrenheit o
CeLsrius.
we a p r o g r to und ntgnest common tactor (HCF) numbers. The two 10
u n o c s Suould be user
detned vanables.
7. Write a
python programw that will check
check for the tollowing conditions:
a F the light is green 10 1
tgo
.
t the light is yellow-C
e
C. E the light is red-Car must
Other signal-unrecognized signal. Example black, blue, etc..