0% found this document useful (0 votes)
97 views

Python Project

The document contains 4 problem statements and their solutions to calculate various mathematical calculations using Python programs that take input from the user. Each program calculates things like total marks and percentage of a student, mathematical operations on two numbers, perimeter and area of a square, and circumference and area of a circle. The programs take input, perform the relevant calculations, and output the results.

Uploaded by

Moomal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views

Python Project

The document contains 4 problem statements and their solutions to calculate various mathematical calculations using Python programs that take input from the user. Each program calculates things like total marks and percentage of a student, mathematical operations on two numbers, perimeter and area of a square, and circumference and area of a circle. The programs take input, perform the relevant calculations, and output the results.

Uploaded by

Moomal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Problem Statement 1:

Create a python program to enter the Name, Roll No. and Marks for 4 subjects and calculate the total
marks and percentage. Use the input Statement for the same.

Program:

name= input("Enter the name of the student:")


roll= int(input("Enter the roll no:"))

english= int(input("Enter the marks for english:"))


maths= int(input("Enter the marks for maths:"))
science= int(input("Enter the marks for science:"))
ict= int(input("Enter the marks for ict:"))

percent= (float)(english+maths+science+ict)/400*100

print("The name of the student is:" , name)


print("The roll no =. of the student is:" , roll)
print("The marks for english are:" , english)
print("The marks for maths are:" , maths)
print("The marks for science are:" , science)
print("The marks for ict are:" , ict)

print("The percentage obtained is:" , percent)

Output:

Enter the name of the student: Amairaa


Enter the roll no: 27
Enter the marks for english: 70
Enter the marks for maths: 85
Enter the marks for science: 90
Enter the marks for ict: 75
The name of the student is: Amairaa
The roll no =. of the student is: 27
The marks for english are: 70
The marks for maths are: 85
The marks for science are: 90
The marks for ict are: 75
The percentage obtained is: 80.0
Problem Statement 2:
Create a python program to enter two numbers and calculate Addition, Subtraction, Multiplication and
Division on the same.

Program:

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


num2 = int(input("Enter the second number:"))

sum = num1+num2
sub = num1-num2
mult= num1*num2
div= (float)(num1/num2)

print("The sum of two numbers is:" , sum)


print("The subtraction of two numbers is:" , sub)
print("The multiplication of two numbers is:" , mult)
print("The division of two numbers is:" , div)

Output:

Enter the first number: 93


Enter the second number: 26
The sum of two numbers is: 119
The subtraction of two numbers is: 67
The multiplication of two numbers is: 2418
The division of two numbers is: 3.576923076923077
Problem Statement 3:
Create a python program to calculate the perimeter and area of Square using the input() function.

Program:

side= int(input("Enter the value for side of the square:"))

perimeter= 4*side
area= side*side

print("The area of the square is:" , area)


print("The perimeter of the square is:" , perimeter)

Output:

Enter the value for side of the square: 6


The area of the square is: 36
The perimeter of the square is: 24
Problem Statement 4:
Create a python program to calculate the circumference and area of a circle using the input() function.

Program:

radius= float(input("Enter the radius:"))

area= (float)(3.14*radius*radius)
circum= (float)(2*3.14*radius)

print("The area of the circle is:" , area)


print("The circumference of the circle is:" , circum)

Output:

Enter the radius:10.5


The area of the circle is: 346.185
The circumference of the circle is: 65.94

You might also like