Computer Science, asked by athisivam05, 5 months ago

Write a Python program to :

a. Calculate average marks of 3 subjects

b. Calculate Simple Interest​

Answers

Answered by jai696
2

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

def _sum(nums):

_sum = 0

for n in nums:

_sum += n

return _sum

average = lambda marks: _sum(marks) / len(marks)

simple_interest = lambda p, r, t: p * (r / 100) * t

print("Average:", average((a := list(map(float, input("3 marks: ").split())))))

print()

p, r, t = float(input("p: ")), float(input("r: ")), float(input("t: "))

print("Simple Interest:", simple_interest(p, r, t))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions