0% found this document useful (0 votes)
21 views7 pages

Python Programming Lab Exercises

The document outlines a series of programming assignments (WAPs) across six labs, focusing on basic Python programming tasks such as arithmetic operations, data structures, file handling, and object-oriented programming. Each lab contains multiple questions that require the implementation of specific functionalities, such as calculating averages, checking for prime numbers, and creating classes. The assignments are designed to enhance programming skills and understanding of Python concepts.

Uploaded by

harshitalavania
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views7 pages

Python Programming Lab Exercises

The document outlines a series of programming assignments (WAPs) across six labs, focusing on basic Python programming tasks such as arithmetic operations, data structures, file handling, and object-oriented programming. Each lab contains multiple questions that require the implementation of specific functionalities, such as calculating averages, checking for prime numbers, and creating classes. The assignments are designed to enhance programming skills and understanding of Python concepts.

Uploaded by

harshitalavania
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

python lab_1

Q)1WAP thats takes a name as input and prints welcom {name} on the screen.

Q)2WAP to take two numbers and print their sum, diff and product

Q3WAP to find square and cube of a number entered by user

Q4WAP to find average of 3 numbers entered by user

Q5WAP to convert delicious to farenheat temparature

Q6WAP that’s takes 2 numbers as inputs and prints all arthamatic operaters

Q7WAP to check whether number is divisable by both 3,5 or not

Q8WAP that’s takes an intiger and thats takes an integer and prints wether less, grater, equals
to 100 or not.

Q9WAP that’s demonstrates all baloon operations

Q10WAP that’s takes 2 numbers and prints value of (a**2 +b**2)/(a+b).

python lab_2
Q1WAP to find largest of 3 numbers

Q2WAP to check given year is leap or not.

Q3WAP to calculate grade of student.

Q4WAP to check given is prime or not.

Q5WAP to print number pyramid.

lab_3
Q1WAP to find 2nd largest number in list

Q2WAP to remove duplicates in list

Q3WAP to split list into even and odd lists

Q4WAP to convert tuple to list.

Q5WAP to show set operations.


lab_4
Q1WAP to set student database
Q2WAP for palindrome.
Q3WAP to count ovels and digits in string.
Q4WAP to reverse words in sentence.
Q5WAP to print primes upto n.

lab_5
Q1WAP to create a file and write 5 lines in it.

Q2WAP to find number of lines in a file.

Q3WAP to merge two files.

Q4WAP to handle zero division error.

Q5WAP to raise value error if given age is less than 18.

Q6 WAP to open a file if file is not existed displays file not found.

lab_6
Q1WAP by using numpy find mean,medean,and standerd deviation of three numbers

Q2WAP plot a graph of curve Y=X*2 using matplotlab by giving values as -10to 10

Q3WAP to create a bar chat of four students as given [A, B, C, D] = [20,25,30,22]and title as
'student per class'

Q4WAP create a car class by atributes as brand and colour. add methods start () and stop ().and
create objects for calling them

Q5WAP create a bank account class with method deposit () and withdraw_balence () perform
them and show ubdates

Q6WAP create a parent class and a child class inharited by the parent class and show that child
class is inharited by parent class

You might also like