How to find minimum and maximum number in given list using Python | Python

Опубликовано: 04 Август 2026
на канале: No Age To Learn
21
like

Thank You For Watching the video ❤️💕





Source Code :

#To find numbers

n = eval(input("Enter a list: "))

minimum = min(n)

maximum = max(n)

sum = 0

for i in n :

if i greater 0 :

sum += i

print("Smallest number of the given list is: ",minimum)

print("Biggest number of the given list is: ",maximum)

print("Sum of all Positive numbers in the given list is: ",sum)



#Create a function to find numbers

def func(n):

minimum = min(n)

maximum = max(n)

sum = 0

for i in n :

if i greater 0 :

sum += i

print("Smallest number of the given list is: ",minimum)

print("Biggest number of the given list is: ",maximum)

print("Sum of all Positive numbers in the given list is: ",sum)










© Under section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, teaching, education, scholarship and research. Fair use is a use permitted by the copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use.