Computer Science, asked by ProBroJokesMan, 9 months ago

*These two questions are of PYTHON programming app please help me out. PLEASE TELL THE CODES* 1. Prompt the user for two numbers, and then print out a sentence stating the sum, product and subtraction. 2. Let us enter marks of Math, Science, SSc, English and French(each out of 100), for a student and display the total and percentage

Answers

Answered by gaganadithyareddy9
1

Answer for 1st question:

x = int(input("Enter a number: "))

y = int(input("Enter another number: "))

print('Sum of numbers = ', x+y)

print('Difference between the numbers = ', x-y)

print('Product of numbers = ', x*y)

Answer for 2nd question:

sum = 0

s = int(input('How many subjects? '))

for i in range(s):

   m = int(input('Enter marks: '))

   sum+=m

print("Total marks = ", sum)

o = s*100

print("Total Percentage = ", sum/o*100)

Hope this works and helps

THANK YOU

Similar questions