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

Python Given Value Sample Programs

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)
10 views2 pages

Python Given Value Sample Programs

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 given value sample programs

Q1. Print sum of 10,5,7.


a=10
b=5
c=7
d=a+b+c
print (d)

Q2. Print difference between 20 and 15.


a=20
b=15
c=a-b
print ( c)
Q3. Print product of 12 and 15.
a=12
b=15
c=a*b
print ( c)
Q4. Print square of 10.
a=10
b=a*a
print(b)
Q5. Print cube and thrice of 7 in the same line.
a=7
b=a*a*a
c=a*3
print(b,c)
[Link] your name and roll in the different lines.
a=”name”
b=1
print(a)
print (b)
Q7. Print area and perimeter of a rectangle when length is 5 and breadth is 3.
l=5
b=3
a=l*b
p=2*(l+b)
print (a,p)
Q8. Print area and perimeter of a square when the side is 13.
s=13
a=s*s
p=4*s
print (a,p)
Q9. The age of a boy is 12, print his sister’s age, who is 5 years younger.
a=12
b=a-5
print(b)
Q10. The price of 1 pen is 15, print the price of 10 pens .
a=15
b=a*10
print(b)
[Link] price of 10 pens is 150, print the price of 1 pen.
a=150
b=a/10
print(b)

You might also like