0% acharam este documento útil (0 voto)
14 visualizações2 páginas

Python Mid Sem

prythom mide sem paper

Enviado por

jagdishsimariya
Direitos autorais
© All Rights Reserved
Levamos muito a sério os direitos de conteúdo. Se você suspeita que este conteúdo é seu, reivindique-o aqui.
Formatos disponíveis
Baixe no formato PDF ou leia on-line no Scribd
0% acharam este documento útil (0 voto)
14 visualizações2 páginas

Python Mid Sem

prythom mide sem paper

Enviado por

jagdishsimariya
Direitos autorais
© All Rights Reserved
Levamos muito a sério os direitos de conteúdo. Se você suspeita que este conteúdo é seu, reivindique-o aqui.
Formatos disponíveis
Baixe no formato PDF ou leia on-line no Scribd
Subject Name: Python for Engineers (3171716) Date: 26/09/2022 VISHWAKARMA GOVERNMENT ENGINNERING COLLEGE B.E. SEM -VII (IC) Mid Semester Examination — 2022 Q-1 (9) Compare Python with C language. 03 (by Compare list, tuples and sets. 03 © List out all the syntax errors from following python code = 04 and rewrite the program again: num = int(input(Enter any two numbers number: )) ifnum <= 0 ‘ print(" {0} number is negative" %format(num)) elseif num = 1 print(nur) else: * print(“*the no is positive) list] EC;IT;Electrical;Mechanical] for i in listl print i Total Marks: 30 Time:4:00 pm to 5:30 pm col col col Q-2(a) What is the output of given python programs: 03 co2 4k fori in range(0,10,2): print(i) ‘elcome to python programming" [Link](e',3) print(c) (©) Explain string data type of python with string slicing and 05 co2 string inbuilt function with suitable examples. OR (BY Explain python comparison, logical and membership operators with as co2 suitable examples. Q-3 Write a python code for following: (Attempt Any three) 2 coz re ‘Add first 100 natural numbers and print the sum of it. 2 Create the list of 7 numbers and [Link] number from the list and display all the elements of the list and also display how maay values are positive from the list. 3 Read the string from the user and check given string is palindrome or not. 4-__Display all the numbers in the range of 101 to 200 which is divisible by3. 6” Read the number from the user and check the number is prime or not.

Você também pode gostar