Practical Assignment 1-Ques
Practical Assignment 1-Ques
Class XI (2020-21)
Assignment No. 1 – Operations on Numeric and string data type
1. Write a Python script to accept two numbers and display their addition, difference, product,
division, integer division, remainder and exponent (raise to power).
2. Write a Python script to accept marks in three subjects (out of 100) and display itstotal marks and
percentage.
3. Write a Python script to accept principal amount, rate of interest and time in yearsand display
simple interest. Note: S = PRT / 100
4. Write a Python script to accept a number and display square and cube of a number.
5. Write a Python script to accept side of a square and display its area and perimeter.
6. Write a Python script to accept length and breadth of a rectangle and display its areaand perimeter.
7. Write a Python script to accept radius of a circle and display its area andcircumference.
8. Write a Python script to accept base and height of a triangle and display its area.
(Area = ½ * b * h)
9. Write a Python script to accept three sides of a triangle and calculate its area usingHeron’s
formula.
s = (a + b + c) / 2 A = √𝑠∗(𝑠−𝑎)∗(𝑠−𝑏)∗(𝑠−𝑐)
10. Write a Python script to accept temperature in Fahrenheit and display it in Celsius. C =( F – 32) *
5/9
11. Write a Python script to accept temperature in Celsius and display it in Fahrenheit.
F = C * 9/5 + 32
12. Write a Python script to accept time in minutes and display corresponding time in hours and
minutes. Example, if Input is 75 minutes, the output is 1 hour 15 minutes.
13. Write a Python script to accept the height in inches and display it in feet and inches.
14. Write a Python script to swap (interchange the value) of two numbers. Display twonumbers with
memory location before and after swapping.
15. Write a Python script input a number and assign this number to three variables. Display three
variables with memory location.
16. Write a Python script to input a string and display it with a # at the end.
Input: Courage is grace under Pressure #Output: Courage is grace
under Pressure#
17. Write a Python script to accept marks in five subjects display the following outputusing a single
print statement.
Example, if the input numbers are 90 70 69 77 99, then output is
Mathematics = 90 English = 70 Science = 69 Social Studies = 77 Sanskrit = 99
18. Write a Python script to accept your name, class, section and display the output inthe following
manner:
NAME: < yourname>
CLASS: < Your class> SECTION: < Your section>
20. Write a Python script to accept first name, middle name and last nameand display the
full name. For example,
Input Output
first name is Ankit Ankit Kumar Jainmiddle name is
Kumar
last name is Jain
21. Write a Python script to accept your name and a number. Display your name somany times on
the screen.
Input Output
Name is Ankit AnkitAnkitAnkit
Number is 3
22. Write a Python script to accept five subjects you have taken in class 11 and display allthe subjects
with * sign between them. For example,
Input
ENGLISH, MATHS, PHYSICS, CHEMISTRY, COMPUTER SCIENCE
Output
ENGLISH*MATHS*PHYSICS*CHEMISTRY*COMPUTER SCIENCE