1
PYTHON
PRACTICAL FILE
By:- Hunar Bhatia
Class- 9H Roll No.-18
2
Index
CONTENT PAGE NO.
Learning Objectives 3
Question 1 - 4-23
10 (coding +
output)
3
Learning Objectives
➔ To inculcate problem solving and analytical skills
➔ To apply conditional statements in solving real life problems .
➔ To understand and apply use of List and various functions
associated with list.
Questions 4
Q1)Write a program in python to :
Imagine you want to decide what to wear based on the weather:
If the weather is sunny , display the message :You will wear sunglasses and hat
If the weather is rainy ,display the message:You will water a raincoat.
Otherwise display the message :Dress comfortably.
5
STOP
6
Q2) Write a program in python to:
Let's say you want to determine if a customer is eligible for a discount based on their
age:
If age >=65 , display the message -Senior citizen discount
If age < 18 ,display the message -Child discount,
Otherwise display the message - Pay regular price
3. Create a list in Python of children selected for Maths quiz
7
8
Q3) Create a list in Python of children selected for Maths quiz with following names-
Arjun,
Sonakshi, Vikram, Sandhya, Sonal, Isha, Kartik
Perform the following tasks on the list in sequence-
○ Print the whole list
○ Delete the name “Vikram” from the list
○ Add the name “Jay” at the end
○ Print the item which is in the second position.
9
STOP
10
Q4)Create a list List_1=[10,20,30,40]. Add the elements [14,15,12] using
extend function.
Now sort the final list in ascending order and print it.
11
12
Q5) Write a Python program to calculate the area and perimeter of a
square
13
6. Write a program to input a number from the user and find the square of 14
that number.
15
7. Create a list of the first nine natural numbers shown below and extract all the 16
odd
numbers from the list using slicing.
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
17
18
Q8. Write a python program to input distance in kilometer and convert its
unit to meter.
19
20
Q9. Write a python program to calculate simple interest , accept principal ,rate
and time from the user.
21
Q10. Write a python program to Input a number between 1 and 7 and display
the weekday 22
based on the number entered.for example , if user enters 1 ,display Monday ,if
user enters 2 display tuesday and so on.
23
24
Thank
You!