You are on page 1of 7

AB Group 10 Assignment

Name Roll Numbers Programs Contributed


Sanket Andhare MBA21191 4, 7, 9
Kore Swathi MBA21216 11, 12, 5
Vankudoth Prashanth MBA21248 6, 8, 16
Aditya Gadalay MBA21187 1, 2, 3
Vetal Shruti Vinayak MBA21249 14, 15
Samarth Sanda MBA21235 10, 13

Q1.

m1=float(input("Enter the marks of first subject:"))

m2=float(input("Enter the marks of second

subject:")) m3=float(input("Enter the marks of third

subject:")) m4=float(input("Enter the marks of fourth

subject:")) m5=float(input("Enter the marks of fifth

subject:"))

total_marks=m1+m2+m3+m4+m5

print("The total marks of all five subjects:",total_marks)

print("The percentage of the total marks is:",total_marks/5,"%")

Q2.

num=int(input("enter 4 digit number"))


i=0
sum=0
while(num!=0):
sum=sum+num%10
num=int(num/10)
i+=1
if(i==4):
print(sum)
else:
print("not a four digit number")
Q3.
dist=int(input("enter distance in kilometers"))
print("Distance in meters is", dist*1000)
print("Distance in centimeters is", dist*100000)
print("Distance in miles is", dist*0.6213)

Q4.

weight=float(input("Enter the weight of the object:

")) pound_weight=weight*2.20
tonne_weight=weight*0.001

print("The weight in pounds

is:",pound_weight) print("The weight in

pounds is:",tonne_weight)

Q5.

Q6.

rad=float(input("Enter the radius of the sphere: "))

vol=4/3*3.14*rad**3

print("The volume of the sphere is:",vol)

Q7.

hun_no=int(input("Enter the number of one hundred rupee notes to be withdrawn: "))

fif_no=int(input("Enter the number of five hundred rupee notes to be withdrawn: "))

thou_no=int(input("Enter the number of one thousand rupee notes to be withdrawn: "))

sum_tot=(100*hun_no)+(500*fif_no)+(1000*thou_no)
print("The total amount withdrawn by the user is: Rs.",sum_tot)

Q8.

year=int(input("Enter the year to be checked: "))

if((year%400 == 0) or (year%100 != 0) and (year%4 == 0)):

print("The year",year,"is a leap

year") else:

print("The year",year,"is not a leap year")

Q9.

hours=float(input("Enter the number of hours you have spent on internet browsing"))

if(hours <= 5):

print("The bill for today is =

Rs.",20*hours) else:

print("The bill for today is = Rs. 100")

Q10.

temp=input("Enter the temperature type:

") hum=input("Enter the humidity type: ")

if(temp == "Warm" and hum ==

"Dry"): print("Play Basketball")

if(temp == "Warm" and hum == "Humid"):


print("Play Tennis")

if(temp == "Cold" and hum == "Dry"):

print("Play Cricket")

if(temp == "Cold" and hum == "Humid"):

print("Swim")

Q11.

numb=float(input("Enter any

number:")) rem=numb%10

if(rem == 5):

print("The square of the number is:",(numb*numb))

else:

print("The last digit of the entered number is not 5")

Q12.

num=int(input("Enter the number of times the sequence should execute"))

for i in range(0,num,1):

print(5**i)

Q13.

num=int(input("Enter the number of times the sequence should execute"))

for i in

range(1,num+1,1):

print(i**2)

Q14.
start = 0

sum = 0

while( start <= 500):

sum=sum+star

t start=start+5

print("The required sum is",sum)

Q15.

import math

num=float(input("Enter the number: "))

num2=abs(num-int(num))

stre= str(num2)

number_count=len(stre)-

2 print(num2)

print("The number of decimal places:",number_count)

Q16.

a.

import math

num=int(input("Enter the number:

")) b=int(input("Enter the base: "))

sum=0

while (num!=0):
sum=sum+(b**num)/

math.factorial(num) num=num-1

print("The sum of series is",sum)

b.

import math

num=int(input("Enter the number:

")) b=int(input("Enter the base: "))

sum=1

while (num!=0):

sum=sum+

(b**num)

num=num-1

print("The sum of series is",sum)

You might also like