Write any two rules for naming the identifiers in python P4 1 L1
Other Or UnclassifiedSource quality review required
Anna University
| University | Anna University |
|---|---|
| Degree | Common to all Subjects |
| Department | Common to all Subjects |
| Regulation | Regulation 2019 |
| Semester | 1 |
| Subject Code | GE5153 |
| Subject Name | Problem Solving and Python Programming |
| Exam Session | April / May 2024 |
| Duration | 3hrs |
| Maximum Marks | 100 |
Access the previous year question paper for your examination preparation.
View / Download PDFBrowse other previous year question papers for this subject.
View All Subject Question PapersAutomatically extracted historical question data. Academic accuracy and examination rules require verification.
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 5 | 13 | 65 |
| C | 1 | 15 | 15 |
Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.
Detected alternatives only. Confirm the actual choice rules in the original question paper.
Write any two rules for naming the identifiers in python P4 1 L1
Other Or UnclassifiedSource quality review required
What is the output of the following print statements in python? 2 a=15+6* ர ee (1+1) L3 print(a) +,"
DefinitionSource quality review required
Write any two ப்ள. between for and while loop 2(1+1) 2 L4
Other Or UnclassifiedSource quality review required
Write a function 1௦ 170 the: greatest of two numbers 2 3 L3 Using this function, find the greatest of 3 numbers 5 [=[10,6,7,12,8) © 2 pen & 2 4 l.pop() Tee L4 print(|) | இ 6 What is the output? 2 4 Le a,b=(10//3,10%3) print(at+1,b+2)
Other Or UnclassifiedSource quality review required
What is the output? 2 4 L3 S1={ i for i in range (5,20,2)) , S2 = {j forj in range (10,25)} print(S14S2)
DefinitionSource quality review required
What is the output? 2 3 L5 d={1:1,1.5:2, 2:3, 2.0:4, 5:5} d[3]=6 0[5]-2 print(d)
DefinitionSource quality review required
What are the writing modes in file 2 5 L1
DefinitionSource quality review required
Differentiate error and exception with an example 2 5 L6
ComparisonSource quality review required
(a) (i) | Describe the organization of a General Purpose Computer with 7 1 L1 neat sketch (ii) | Draw flow chart to find the roots of quadratic equation. 6 1 L3
Other Or UnclassifiedSource quality review required
(b) (i) | List the various types of operators in python and explain each 7 1 L1 with example (ii) | Write an algorithm to reduce a given number of arbitrary length to 6 1 LS a single digit, by repeatedly summing its digits. E.g: for an input 148, display 4 (1+4+8=13, 1+3=4)
Other Or UnclassifiedSource quality review required
(a) (i) | With suitable programs, demonstrate how the functions are being 8 2 L3 called by passing or not passing parameter(s) which may or may not return values. (ii) | Get a point as x & y in xy plane & display its standard quadrant 5 2 L6
Other Or UnclassifiedSource quality review required
(b) (i) | Write a function to return a factorial of a number. Using this 8 2 L3 function write a program to find the value of the following for the given n andr: nCr = (n-r)! + (n! x rl) (ii) | Write a Python program to print the following pattern up to a given 5 2 L6 limit . Example if the size is 5 1 1 2 ட 1 23 4 ர் ட் ௭ 1. 3°48 1/2. .3 122 1
Other Or UnclassifiedSource quality review required
(a) (i) | Describe map, reduce and filter with example. 7 ட L3 (ii) | Consider a tuple of temperatures in Celsius as (32, 33.4, 34.5, 6 3 L2 37, 36.8). Create a list of temperatures in Fahrenheit using “map” function from this tuple.
Other Or UnclassifiedSource quality review required
(b) (i) | Illustrate union, intersection and difference operations on set with 7 3] L3 example (ii) | Write a function to return next Fibonacci number. Using this 6 ©) L2 function, create a list of Fibonacci numbers up to a given limit. E.g: If the limit is 20 then the list is [0,1,1,2,3,5,8, 13]
Other Or UnclassifiedSource quality review required
(a) (i) | Write a python program to check whether a given subject code is 7 4 L1 valid or not.(first two characters must be alphabet, next 4 must be integers, overall 6 in length. E.g ‘GE5153’ is valid GEX929 is invalid) (ii) | Write any four string functions with examples 6 4 L3
Other Or UnclassifiedSource quality review required
(b) (i) | Write different ways in which, dictionaries are created? Describe 7 4 L1 methods that can be performed on‘dictionaries Consider two dictionaries of marks:in 4 subjects 6 4 3 (il) | 15 (a) (i) Explain the file operations, open, close, reading & writing the files with various modes with example L2 (ii) Consider a text file ‘bank.txt’, where in each line contains, account number, and amount. Write a python program to get account number, amount and type of transaction as deposit or withdrawal and accordingly add or subtract the amount, and show the balance. L6
Other Or UnclassifiedSource quality review required
(b) (i) Explain different Python exception handling constructs with suitable examples [2 (ii) Write a python program to handle “divide by zero” & ‘value error’ exception. L6
Other Or UnclassifiedSource quality review required
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.