0% found this document useful (0 votes)
5 views10 pages

INTRODUCTION

Uploaded by

ishanbahuguna5
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)
5 views10 pages

INTRODUCTION

Uploaded by

ishanbahuguna5
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/ 10

INTRODUCTION

NAME - ISHAN BAHUGUNA


CLASS - XI A
ROLL NO. - 49
PROJECT ON DATA HANDLING
(TYPE C QUESTIONS)
SUBMITTED TO: MRS. SEEMA SHARMA
1.WAP to obtain principal amount, rate of interest
and time from user and compute simple interest.

a=float(input("Enter the principal amount:"))


b=float(input("Enter the rate of interest(in %):"))
c=float(input("Enter the time period(in years):"))
print("The Simple Interest is:",(a*b*c)/100)

2. WAP to obtain temperatures of 7 days(Monday, Tuesday,…. Sunday) and


then display average temperature of the week.
a=float(input("Enter the temperature of Monday:"))
b=float(input("Enter the temperature of Tuesday:"))
c=float(input("Enter the temperature of Wednesday:"))
d=float(input("Enter the temperature of Thursday:"))
e=float(input("Enter the temperature of Friday:"))
f=float(input("Enter the temperature of Saturday:"))
g=float(input("Enter the temperature of Sunday:"))
print("The average temperature of the week is:",(a+b+c+d+e+f+g)/7)
3. WAP to obtain x, y, z from the user and calculate
expression :
4x4 + 3y3 + 9z + 6π
import math
x=int(input("Enter first number:"))
y=int(input("Enter second number:"))
z=int(input("Enter third number:"))
e=4*x**4+3*y**3+9*z+6*math.pi
print("The value of expression:",e)

4.WAP that reads a number of seconds and prints it


in form: mins and seconds, eg, 200 seconds are
printed as 3 mins and 20 seconds.

s=int(input("Enter the number of seconds:"))


m=s//60
a=s%60
print(m,"minutes",a,"seconds")
5. WAP to take year as input and check if it is a leap
year or not.
a=int(input("Enter the year:"))
if a%4==0:
print("It is a leap year")
else:
print("It is not a leap year")

6. WAP to take two numbers and print if the


first number is fully divisible by second
number or not.

a=int(input("Enter the first number:"))


b=int(input("Enter the second number:"))
if a%b==0:
print(a,"is divisible by",b)
else:
print(a,"is not divisible by",b)
7. WAP to take a two-digit number and then
print the reversed number. That is, if the
input given is 25, the program should print
52.

a=int(input("Enter the first(single digit) natural number:"))


b=int(input("Enter the second(single digit) natural number:"))
print("Original number:",(a*10)+b)
print("Reversed number:",(b*10)+a)

8. WAP to take a three-digit number and


then print the reversed number.
a=int(input("Enter the first(single digit) natural number:"))
b=int(input("Enter the second(single digit) natural number:"))
c=int(input("Enter the third(single digit) natural number:"))
print("Original number:",(a*100)+(b*10)+c)
print("Reversed number:",(c*100)+(b*10)+a)
9. WAP to take two inputs for a day, month
and then calculate which day of the year,
the given date is. For simplicity take 30
days for all months.

a=int(input("Enter the day:"))


b=int(input("Enter the month:"))
c=a+(b-1)*30
print("DAY OF THE YEAR",c)

10. WAP that asks a user for a number of


years, and then prints out the number of
days, hours, minutes, and seconds in that
number of years.
a=float(input("How many years?"))
b=365*a
c=24*b
d=60*c
e=60*d
print(a,"years is :")
print(b,"days")
print(c,"hours")
print(d,"minutes")
print(e,"seconds")
11. WAP that inputs an age and print age
after 10 years.
a=int(input("What is your age?"))
b=a+10
print("In
ten years, you
will
be",b,"years old!")

12. WAP to find a side of a right-angled


triangle whose two sides and an angle is
given.
import math
a=float(input("Enter the first given side:"))
b=float(input("Enter the second given side:"))
c=math.sqrt(a**2+b**2)
print("The third side of the given triangle is:",c)

13.WAP to calculate the radius of a sphere


whose area 4πr2 is given.
import math
a=float(input("Enter the area of the sphere:"))
#a=4*math.pi*r**2
r=math.sqrt(a/4*math.pi)
print("The radius of the sphere is:",r)

14. WAP that inputs a string and then prints


it equal to number of times its length.
a=(input("Enter string:"))
b=len(a)
c=b*a
print(c)

15. Find the volume of the cylinder(πr2h) as


shown:

import math
a=8 R=8cm
b=15 H=15cm
c=math.pi*(a**2)*b
print("The radius of the cylinder is(in cm):",a)
print("The height of the cylinder is(in cm):",b)
print("Volume of the given cylinder is",c)
16. WAP to input the radius of a sphere and
calculate its volume.
import math
a=float(input("Enter the radius of the sphere:"))
V=4/3*math.pi*(a**3)
print("The Volume of the sphere is:",V)

17. WAP to calculate amount payable after


Simple Interest.

a=float(input("Enter the Principal Amount:"))


b=float(input("Enter the Rate Of Interest:"))
c=float(input("Enter the Time Period(in years):"))
p=a*b*c/100
print("The Payable Amount after simple interest is:",a+p)
18. WAP to calculate amount payable after
compound interest.
a=float(input("Enter the principal amount:"))
b=float(input("Enter the rate of interest:"))
c=float(input("Enter the time period:"))
A=a*(1+b/100)**c
print("The amount payable after compound interest is:",A)

19. WAP to compute (a+b)3 using the


formula: a3 + b3 + 3a2b + 3ab2
a=float(input("Enter first value:"))

b=float(input("Enter second value:"))

f=(a**3)+(b**3)+3*((a**2)*b)+3*(a*(b**2))

print("The value of (a+b)^3 is:",f)

You might also like