No products in the cart.

Find the greatest number by using …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Find the greatest number by using Loop, pls tell fast ?
  • 2 answers

Aries 24 3 years, 9 months ago

def maximum(l): myMax = l[0] for num in l: if myMax < num: myMax = num return myMax list=[] Number = int(input("Please enter the Total Number of List Elements : ")) for i in range(1, Number + 1): value = float(input("Please enter the %d Element : " %i )) list.append(value) print ("maximum element is:", maximum (list))

Aries 24 3 years, 9 months ago

def maximum(l): myMax = l[0] for num in l: if myMax < num: myMax = num return myMax list=[] Number = int(input("Please enter the Total Number of List Elements : ")) for i in range(1, Number + 1): value = float(input("Please enter the %d Element : " %i )) list.append(value) print ("maximum element is:", maximum (list))
http://mycbseguide.com/examin8/

Related Questions

Define packages
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
What is alu
  • 1 answers
Write a program for swapping two numbers?
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App