- What is a class?. How to define a class in Python?. How to instantiate a class? How the members are accessed?
- Differentiate class variables and instance variables
- Write a python program that uses date time module within a class, takes a birthday date as input from the user and prints the age and number of days, hours, minutes and seconds until the next birthday.
- Differentiate between simple, multiple and multilevel inheritance
- Write a python program that has a class Point with attributes as X and Y coordinates. Create two objects of this class and find the midpoint of both these points. Add a method reflex_x to class Point which returns a new point. Which is the reflection of the point about the X- axis.ex: Point(5,10) = refle_x returns point (5,-10).
- Write a program that has a class Person, inherit a class student from person which also has a class MarksAttendence. Assume the attributes for person class as USN, Name, DOB,Gender. Attributes for student class as : Class, Branch,Year , Attributes for MarksAttendence : Marks, Attendance. Create a student S=Student(‘1JS20IS001’,’unknown’,20-20-2000,’M’,90,95) and display the details of the student.
- Write a python program to express instances as return values to define a class rectangle with members width, height, corner_x, corner_y and member function: to find centre, area and perimeter of rectangle.
- Explain __init__ and str method with an example python program.
- Define polymorphism. Demonstrate polymorphism with function to find histogram to count the number of times each letter appears in a word and in sentence.
- What is pure function. Write a python program to find duration of event if start and end time is given by defining class Time.
- Write a python program to illustrate the concept of global variable.
Tuesday, April 14, 2020
Python Application Programming - Module 4 - 17CS664, 18CS55
Saturday, April 4, 2020
Python Application Programming - Module 2 - 17CS664, 18CS55
- Explain for and while loop. Write a program to generate fibonacci series up to the given limit by defining fibonacci (n) function.
- Mention the advantage of continue statement. Write a program to compute only sum of even numbers within the natural number using continue statement.
- Define string. Illustrate how it can be traversed using for loop.
- What are string slices. Explain the slicing operator in python with examples.
- Write a python program to display presence of given substring in main string.
- How computational faults or computational errors are handled in python.
- Write a python program to copy all lines beginning with vowels from SAMPLE.txt to VOWEL.txt retaining other lines.
- With syntax, explain finite and infinite looping constructs in python. What is the need for break and continue statements.
- Write a python program to generate and print prime numbers between 2 to 100.
- Write a python program to count the number of occurrences of a given word in a file.
- Write a python program that takes decimal number as input and convert that to binary equivalent and return the same.
- List any five methods associated with strings and explain each of them with an example.
Python Application Programming - Module 1 - 17CS664, 18CS55
- List the key features of Python Programming Language.
- What is the role of a programmer?. List at least two skills required to be a best programmer.
- Differentiate between compiler and interpreter
- Explain Python words and sentences with an example for each.
- What is meant by interactive mode.
- Explain short circuit evaluation of expression with suitable example in python.
- Mention three types of error encountered in python programming language.
- Explain the basic building blocks of python with an example
- Explain the chained and nested conditional execution statements along with syntax and flowchart.
- Write a python program to find the largest of three numbers
- Write a python program to check whether a given year is leap year or not with functions.
- Describe the python language support for arithmetic operators with an example.
- Write a python program to calculate student result based on 2 exam, 1 sport event and 3 activities conducted in a college with weightage of the activity - 20% and sports - 20% for 50 marks.
- List and give syntax of all python supported conditional statements along with its usage with an example program to check whether given number is positive or negative or zero.
- Differentiate between parameter and argument. Illustrate the flow of execution of a python function with an example program to convert given Celsius to Fahrenheit temperature.
Wednesday, April 1, 2020
Python Application Programming - Module 3 - 17CS664, 18CS55
- Explain the concept/properties of Lists in Python with suitable example and state diagram.
- Explain the concept of mapping in Lists with state diagram.
- What are the different ways of traversing a list. Explain with an example for each.
- Describe any two operations on list with suitable example.
- Illustrate with an example slicing operator on lists.
- Illustrate the usage of list methods with suitable example.
- Write a program in python to illustrate the concept of reduce in Lists
- Write a program in python to illustrate the concept of filter in Lists
- Write a function called Nested_List_Sum that takes a nested list of integers and add up the elements from all of the nested lists.
- Write a function that takes a list of string as argument and convert all element to uppercase and return a new nested list and display.
- Differentiate between pop and remove methods on Lists with suitable example.
- Illustrate with an example how to delete more than one element from a list.
- Write a program to read n numbers from user and store them in a list. Find the sum, avg, max, min values from the List.
- Construct a code to convert a string to a List.
- Explain the concept of aliasing in List with suitable example.
- Compare and contrast Lists and Tuples.
- Create a list with nested list elements in it and iterate over them to print each element and subelement of a list.
- Explain the following operations in tuples.
- sum of two tuples
- Slicing operators
- Comparison of two tuples
- Assignments to variables
- List merits of dictionary over list.
- Demonstrate how a dictionary item can be represented as a list of tuples.
- Demonstrate how tuples can be used as keys in a dictionaries.
- Explain extracting data using regular expressions. Implement a python program to find for lines having ‘@‘ character sign between characters in a read text file.
- Write a python program using findall() to find the lines with phone numbers (10 digit) and extract one or more phone numbers from each of those lines.
- Write a program that searches for a line that starts with ‘1JS’ followed by any non whitespace character comprising of valid USN number and colon followed by a space and any meaningful student name.
- Write a program in python to illustrate the power of escape character along with regular expression.
Wednesday, March 25, 2020
Operating Systems - Module 3 - Important Questions - 18CS43
- Explain the normal mode of operation of a process and when it is in a deadlock state with suitable example.
- Briefly explain the characteristics that results in deadlocks
- Describe deadlocks with the help of a resource allocation graph
- Briefly explain the methods for handling deadlocks
- Examine deadlock prevention w.r.t four necessary conditions of a deadlock.
- Explore and explain the two deadlock avoidance algorithms.
- How is a system recovered from deadlock.
- Explain Banker's Algorithm.
- Explain memory allocation model for a process.
- Explain the implementation of non contiguous memory allocation using segmentation.
- Discuss the techniques used to perform fresh memory allocation from a free list.
- Compare contiguous and non contiguous memory allocation technique
- Define : i) Virtual memory ii) Page Fault
- Define : i) Page in operation ii) Page out operation
- Define : i) Memory fragmentation ii) Memory Compaction.
- Define : Page and Page Frames.
- Define : internal and external fragmentation.
- Define : Paging and external fragmentation.
- Define : Logical and physical address
- Explain the concepts involved in demand loading of a page with neat diagram.
- Explain FIFO and LRU page replacement policies.
- Explain demand loading of a page with the help of a figure.
- Discuss the methods used to achieve the memory protection with a suitable example.
- Describe the memory allocation methods for program controlled blocks.
- Explain demand paging preliminaries.
Operating Systems - Module 2 - Important Questions - 18CS43
- With the help of a state transition diagram explain fundamental state transitions of a process.
- Explain fields of process control block
- What are the advantages of thread over process
- Explain functions of long, medium and short term schedulers in a time sharing system.
- Describe the components of process environment
- Explain with neat diagram kernel level thread implementations
- Explain fundamental state transition diagram for a process with process control block
- Explain in detail the programmers view of processes. With interaction between processes, highlight the remark for its interaction.
- What is a thread?. List its advantages
- Explain the control synchronisation and data access synchronisation with examples.
- With a neat diagram, Explain the different states of a process in unix operating system.
- Explain with neat diagram. i) User level threads ii) Kernel level threads
- Discuss the primary concerns / reasons for process termination.
- List the events occur during the operation of OS. With a diagram discuss the event handling actions of kernel.
- With a diagram explain the relation between processes and threads. Discuss the advantages of threads
- Explain four kinds of process interaction
- Explain control synchronisation and need for control synchronisation with an example.
- Explain the race condition in airline reservation system with an example.
- What is race condition?. List the requirements that a solution to critical section must satisfy.
- Illustrate with example the Peterson's solution for critical section problem and prove that the mutual exclusion property is preserved.
- Explain Reader's-Writer's problem. Show how semaphores provide solution to Reader's- Writer's problem.
- Explain the Dining Philosopher's problem using monitors.
- What are semaphores ? Explain any 3 use cases of Semaphores.
- Describe an n-process solution to critical section problem which uses test() and set() hardware instruction. Prove how this algorithm satisfies all the requirements of critical section problem's solution.
- Explain critical section problem. What are the requirements that critical section probelm must satisfy.
- What are Monitors? Compare with semaphores their relative advantage and disadvantage.
- What do you mean by binary semaphore and counting semaphore?
- Explain implementation of wait() and signal() semaphore operation.
Monday, February 17, 2020
Operating Systems - Module 1 - Important Questions - 18CS43
- Define operating systems? List the goals of the operating System and explain.
- List and explain the different computational structures of operating system
- Explain the term w.r.t operating system: (a) Efficiency (b) System Performance (c) User service
- What are the different classes of operating system. Explain them with their primary concern.
- List and explain the key concerns of operating system
- Explain various resource allocation strategies
- Explain about the components of modern computer system?
- What is boot strap loader?
- Explain the dual mode operation of an operating system.
- Explain the services offered by operating system.
- Explain the working of system call.
- How is layered structure advantageous over simple structure of operating system?
- Distinguish between the following term:
- Multiprogramming and Multitasking
- Multiprocessor and Clustered System
- Demonstrate the concept of virtual machine with an example.
- Explain the role of operating system from different view point.
Subscribe to:
Posts (Atom)
Database Management systems - Module 2
1 a. Explain the entity integrity and referential integrity constraints. Why is each considered important. Give examples. b. Discuss eq...
-
Explain any 2 socket functions. Explain the support for parsing HTML using regular expressions with an example program. Describe a suppo...
-
What is a class?. How to define a class in Python?. How to instantiate a class? How the members are accessed? Differentiate class varia...
-
MODULE - 1 - Introduction to Databases Explain the characteristics of data base approach. Compare DBMS and early file systems bringing ou...