Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

AMITY INTERNATIONAL SCHOOL

MAYUR VIHAR

LAB ACTIVITY
PYTHON PROGRAMS
S.NO
QUESTIONS:
1 WAP TO ACCEPT INPUT FROM USER
AND PRINT THE SAME
2 WAP TO ACCEPT EMPLOYEE
IMFORMATION (EMPLOYEE NAME,
SALARY, DATE OF JOINING)
3 WAP TO CHECK THE DATATYPE OF
INPUT VALUE.
4 WAP to take input of two numbers
and add, subtract, multiply and divide
them.
5 GENERATE A FEE BILL FOR A STUDENT,
TOTAL ANNUAL FEE
6 WAP to enter marks out of 500 and
find the percentage.
7 WAP to find the surface area of a
rectangular prism.
8
9
10
11
12
13
14
CODE 1:
WAP (Write a program) to take an input from user and print them.

CODE:

#WAP to take input from user and display it.

a=input ('enter your name:')

b=int (input ('enter marks 1:'))

c=int (input ('enter marks 2:'))

d=b + c

print ('The name entered is', a)

print ('The total marks is', d)

OUTPUT:
CODE 2:
#WAP to take an input of two numbers and add them.
a=int (input ("Enter a number."))
b=int (input ("Enter another number."))
c=a+b
print ("The sum of the two given numbers is",c)
CODE 3:

a=str (input ("enter some something"))


b=int (input ("enter some something"))
c=float (input ("enter some something"))
print(type(a))
print(type(b))
print(type(c))
CODE 4:
#WAP to take input of two numbers and add, subtract, multiply and divide them.
a=int (input ("Enter a number."))
b=int (input ("Enter another number."))
c=a+b
d=a-b
e=a*b
f=a/b
print ("The sum is",c)
print ("The difference is",d)
print ("The product is",e)
print ("The quotient is",f)
CODE 5:
#Q5 GENERATE A FEE BILL FOR A STUDENT, TOTAL ANNUAL FEE - (4*QFEE) +(12*200)
name=input ('enter student name')
Amo=input ('enter admission number')
class=input ('enter class)
fee=12*300
a fee=4*fee
print ('FEE BILL')
print ('name:', name)
print ('admission number is:', Amo)
print ('class', class)
print ('quarter fee is', fee)
print ('total amount is', a fee)
CODE 6

#WAP to enter marks out of 500 and find the percentage.

a=float (input ("Enter your marks out of 500."))

b=a/500*100

print ("You have scored",b,"%.")


CODE 7

#WAP to enter marks out of 500 and find the percentage.


a=float(input("Enter your marks out of 500."))
b=a/500*100
print("You have scored",b,"%.")
CODE 8

#WAP to find the surface area of a rectangular prism.


l=float(input("Enter the length of the prism."))
b=float(input("Enter the breadth of the prism."))
h=float(input("Enter the height of the prism."))
sa=2*((l*b)+(b*h)+(l*h))
print("The surface area of the rectangular prism of the given dimensions is",sa,"unit.")

You might also like