Assignment No:01
- To understand the basics about python programming.
- To learn how to write and execute python program.
- Upon completing this lab exercise, the learner will be able to
- Write a basic python program.
- Interpreted and run python program.
- Understand the identifiers and operators in python.
- What is Python?
- Why is python called as dynamic typing language?
- How to store different types of data inside python identifier?
- What is the difference between interpreter and compiler?
- What is classpath? why do need it?
- Explain the steps to execute python program through command prompt?
- What is IDLE?
- What is mean by comment in python and how many types of comments?
- What is mean by type conversion in python?
- How do we accept various types of input from the user in python programming?
-----------------------------------------------------------------------------------------------------------------------------
Assignment No:02
- To understand the basics about python data structures.
- To learn how to create and manipulate data inside lists, tuples and dictionaries.
- Upon completing this lab exercise, the learner will be able to
- Write a basic python data structures syntax and semantics.
- How to create empty list and how to perform various operations on lists for data manipulations.
- How to create empty tuple and how to perform various operations on tuple for data manipulations.
- How to create empty dictionary and how to perform various operations on dictionary for data manipulations.
- What are the mutable and immutable objects in python?
- How to create and access elements from lists?
- How to modify and slice the lists elements?
- What is mean by nested list explain with example?
- What type of data we can store in list?
- How to create and access elements from Sets?
- How to perform various operations on the Sets?
- What is the difference between set and frozen set?
- Why do we require dictionaries in python?
- Explain the copying collections: shallow copy and deep copy with example?
Assignment No:03
Problem Statement: Write a function to calculate factorial of a number. Develop a program to compute
binomial coefficient (Given N and R).
Aim: To implement function using python programming.
Learning Objectives:- To understand the basics about python functions.
- To learn how to create and manipulate data inside functions.
- To learn types of functions.
Learning Outcomes:- Upon completing this lab exercise, the learner will be able to
- Write a basic python function syntax and semantics.
- To implement functions for various task.
- Clear the difference between user defined function and built in function.
Theory:- Why is indenting required in python?
- Explain with example all decision-making statement in python?
- Explain with example nested if else statement?
- Why do we require iteration statement in python?
- Explain with example while loop in python?
- Explain with example for loop with break and continue statement in python?
- What is function? also explain why do we require functions in python programming language?
- What is map () function explain with example?
- What is filter () function explain with example?
- What is lambda () function explain with example?
Algorithm:a) Algorithm for factorial of any number and compute binomial coefficient.Step 1: StartStep 2: Accept N and R from the user.Step 3: using function of factorial compute the factorial of N.Step 4: Display the factorial of value N.Step 5: Compute the binomial coefficient of N and R (N!) /((N!) *(N-R)!)Step 6: Display the binomial coefficient of N and R.Step 7: Stop.
Flowchart:1) Flowchart for python program that demonstrates the factorial of any number.
Conclusion: Hence, we learn how to implement the function like user defined function for computation of factorial of any number n.
- To understand the basics about python functions.
- To learn how to create and manipulate data inside functions.
- To learn types of functions.
- Upon completing this lab exercise, the learner will be able to
- Write a basic python function syntax and semantics.
- To implement functions for various task.
- Clear the difference between user defined function and built in function.
- Why is indenting required in python?
- Explain with example all decision-making statement in python?
- Explain with example nested if else statement?
- Why do we require iteration statement in python?
- Explain with example while loop in python?
- Explain with example for loop with break and continue statement in python?
- What is function? also explain why do we require functions in python programming language?
- What is map () function explain with example?
- What is filter () function explain with example?
- What is lambda () function explain with example?
Assignment No:04
- To understand the basics about python decision making statement.
- To understand the basics about python looping statements.
- Upon completing this lab exercise, the learner will be able to
- Write a basic python looping statement syntax and semantics.
- How and when to use decision making statements.
- What is object-oriented programming?
- What is class and objects explain with example?
- What encapsulation and abstraction explain with example?
- What is mean by Inheritance explain with example?
- What does constructor explain all types of constructors?
-----------------------------------------------------------------------------------------------------------
Assignment No:05
Problem Statement: Develop a program to read the student details like name, USN and marks in 3
subjects. Display the student details, total marks and percentage with suitable
messages
Aim: To implement class by using student entity.
Learning Objectives:- To understand difference between procedure-oriented language and object-oriented language.
- To understand the uses of oops features like encapsulation and data hiding.
- To understand the syntax of writing class.
Learning Outcomes:- Upon completing this lab exercise, the learner will be able to
- Able to map any entity into the class.
- Able to analyze the problem statement.
- Able to identify properties and behavior of entity.
Theory: - Explain different types of Inheritance?
- Explain the term: Operator overloading, Method Overloading, Method Overriding
- What is exception handling?
- What is file? how to perform reading and writing operation on file?
- Explain seek (), tell (), readline(), readlines() methods.
Algorithm:
a) Algorithm for display the student details, total marks and percentage with suitable messagesStep 1: StartStep 2: Accept student name, USN and marks of three subjects (FPP, AC, SPM)Step 3: using function find out the total of three subjects.Step 4: Using function find out the percentage of students.Step 5: Display all the details of student.Step 6: Stop
Flowchart: Draw this flowchart by your own.
Conclusion: Hence, we learn how to implement the class in python along with its object creation and calling of functions as per the priority user requirement.
- To understand difference between procedure-oriented language and object-oriented language.
- To understand the uses of oops features like encapsulation and data hiding.
- To understand the syntax of writing class.
- Upon completing this lab exercise, the learner will be able to
- Able to map any entity into the class.
- Able to analyze the problem statement.
- Able to identify properties and behavior of entity.