D92929
D 92929
THIRD SEMESTER (CBCSS-UG) DEGREE EXAMINATION
NOVEMBER 2020
Electronics
ELE 3A 11-GENERAL COURSE I : PYTHON PROGRAMMING
Time: Two Hours and a Half Maximum 80 Marks
Section A
Answer at least ten questions.
Each question carries 3 marks. All questions can be attended.
Overall Ceiling 30.
1. What is a byte code?
2. What are identifiers in python?
3. Give the membership operators in python with examples.
4. Explain output statements in Python.
5. Write the syntax of for loop statement.
6. What are loop control statements?
7. Explain range () function.
8. What are the advantages of function?
9. Define positional arguments in a function.
10. How function call is done in Python?
11. What are local variables?
12. What are the different ways to create strings in Python?
13. What are Lists?
14. What are the rules for creating keys in a dictionary?
15. How the elements in a string can be accessed using fir loop?
(10 x 3=30 marks)
Section B
Answer at least five questions. Each question carries 6 marks. All questions can be attended. Overall Ceiling 30.
16. Explain the different relational operators in Python with examples.
17. Write a program to find the sum of all odd and even numbers up to a number specified by the user.
18. Write a program to check whether a number is prime or not. Prompt user for input.
19. Find the area and circumference of a circle. Prompt user for input.
20. Describe the syntax for the following function and explain with an example :
a) abs() b) max() c) pow() d) len() e) sort()
21. Write a program to add two numbers using function.
22. Write a Python code to find the mean and variance from a list of numbers.
23. Describe the syntax for the following function and explain with an example:
a) replace() b) rstrip() c) reverse() d) count() e) join()
(5 x 6=30 marks)
Section C
Answer any two questions. Each question carries 10 marks.
24. Explain the different data types used in Python with examples.
25. Write a program to print the sum of the following series: 1+1/2+1/3 + 1/4 + ... + 1/n.
26. Write a Python program using function to find the value of nPr, n!/(n-r)! Without using in built factorial() function.
27. Write a Python program to check for the presence of a key in the dictionary and sum all its values.
(2 x 10=20 marks)
നിങ്ങൾക്ക് ഉപകാരപ്പെട്ടെങ്കിൽ നിങ്ങളുടെ കൂട്ടുകാർക്ക് കൂടി ഷെയർ ചെയ്യുക
Share This