0% found this document useful (0 votes)
2 views2 pages

Test 2

The document outlines a series of programming tasks in Python, including checking divisibility by 3, calculating electricity bills based on usage, filtering numbers from a list, and various looping and conditional exercises. It also includes data manipulation tasks using the Seaborn package for visualizations and data analysis. Each task specifies the requirements and conditions for implementation.

Uploaded by

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

Test 2

The document outlines a series of programming tasks in Python, including checking divisibility by 3, calculating electricity bills based on usage, filtering numbers from a list, and various looping and conditional exercises. It also includes data manipulation tasks using the Seaborn package for visualizations and data analysis. Each task specifies the requirements and conditions for implementation.

Uploaded by

Shubham Gaikwad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Write a Program to check whether a number (Entered by user) is divisible by 3 or not?

2. Write a program to calculate the electricity bill (unit number entered by user) according to
following criteria

Unit Price
Less than 100 No charges
Between 100 – 200 15 per unit
Greater 200 25 per unit

3. Write a program to display only those numbers from a list that satisfy the
following conditions Number = [ 12, 75, 150, 180, 145, 525, 50]

 The number must be divisible by five


 If the number is greater than 150, then skip it and move to the next
number
 If the number is greater than 500, then stop the loop

4. Print list in reverse order using a loop


List = [10,20,30,40,50]
5. Write a Python program to count the number of even and odd numbers
from a series of numbers
numbers = (1, 2, 3, 4, 5, 6, 7, 8, 9)

6. Write a Code of using for loop with multiple condition


a. List = [10,20,30,40,50]
b. List > 20 and list <40
7. Write a Python program to find numbers divisible by nineteen or thirteen
from a list of numbers using def function
a=[19, 65, 57, 39, 152, 639, 121, 44, 90, 190]
8. Write a Python program using for loop with if
a. Take a range of number from 1 to 20
b. Number greater than 10 and less than 15
c. Number Equal to 18
d. Number greater then 18

9. Write a Python program with nested if


a. User will input a random value
b. Outer if number <=100
c. Inner if condition >50
i. Elif >30
ii. Elfi >20
iii. Else
10.Write a For loop using if condition
a. X = [“aa”,”bb”,”cc”,”dd”,”ee”]
b. If condition should print
c. Using break

11.Write a For loop using if condition


a. X = [“aa”,”bb”,”cc”,”dd”,”ee”]
b. Using continue
c. Print
12.Write a For loop using multiple condition
a. User should define And condition

13.Write a For loop using multiple condition


a. User should define a Condition

Below questionnaire import tips dataset from seaborn package

14.Using Seaborn package


a. Scatterplot
b. Bar plot
c. Boxplot
15. Take a subset using Loc & iloc function
a. Row = 5,10,15 and column 2,4,6
16. Find out No. of customer who come for dinner & bill is more than 500
17. Sort data in descending order based on Size
18. Find out when more No. of customer dinner or lunch

You might also like