

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
dont fucking comple upload to downloas
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
(Model Question Paper – I) Time: 3 Hours] [Maximum Marks: 100 Instructions to students: Answer FIVE FULL questions Q.No. Questions Marks CO
**Cognitive Level
a)** Describe Arithmetic Operators, Assignment Operators, Comparison Operators, Logical Operators and Bitwise Operators in detail with examples.
b) Explain the Identifiers, Keywords, Statements, Expressions, and Variables in Python programming language with examples.
c) Explain the basic data types available in Python with examples.
a) Write Python Program to reverse a number and also find the Sum of digits in the reversed number. Prompt the user for input.
b) Write Pythonic code to check if a given year is a leap year or not.
c) Write Python program to find the GCD of two positive numbers.
a) Write Python code to determine whether the given string is a Palindrome or not using slicing.
b) Explain the use of join() and split() string methods with examples. Describe why strings are immutable with an example.
c) Write Python program to count the total number of vowels, consonants and blanks in a String.
4. a) Write Python program to add two matrices and also find the 7 CO3 L Dr. Ambedkar Institute of Technology, Bengaluru – 560056
transpose of the resultant matrix. b) Input five integers (+ve and −ve). Write Pythonic code to find the sum of negative numbers, positive numbers and print them. Also, find the average of all the numbers and numbers above average.
c) Write Pythonic code to find Mean, Variance and Standard Deviation for a list of numbers.
a) Discuss the relation between tuples and lists, tuples and dictionaries in detail.
b) Write Python program to swap two numbers without using Intermediate/Temporary variables. Prompt the user for input.
c) Write a program that accepts a sentence and calculate the number of digits, uppercase and lowercase letters.
a) Write Pythonic code to sort a sequence of names according to their alphabetical order without using sort() function.
b) Discuss zip() function with an example. 6 CO3 L c) Illustrate the following Set methods with an example. a) intersection() b) union() c) issubset() d) difference() e) update() f) discard()
a) Discuss the following special characters in detail. a) \d b) \w c) \b d) {m, n} e) \ f)?
b) Consider the file structure given below. Write Python program to delete all the files and subdirectories from the Extinct_Animals Directory. 6 CO4 L c) Describe the difference between Python os and os.path modules. Also, discuss the following methods of os module a) chdir() b) rmdir() c) walk() d) listdir() e) getcwd()
a) Describe the characteristics of the CSV format. 7 CO4 L b) Write Python program to write the data given below to a CSV file. Category,Winner,Film,Year Best Picture,Doug Mitchell and George Miller,Mad Max: Fury Road, Visual Effects,Richard Stammers,X-Men:Days of Future Past, Best Picture,Martin Scorsese and Leonardo DiCaprio,The Wolf of Wall Street, Music(Original Song),Adele Adkins and Paul
Dr. Ambedkar Institute of Technology, Bengaluru – 560056