Answers for "find largest number python"

1

python find largest variable

x = 1
y = 2
z = 3
var = {x:"x",y:"y",z:"z"}
max(var)
var.get(max(var))
var.get(min(var))
----OUTPUT----
3
z
x
Posted by: Guest on February-08-2021
1

Largest number python

# This program will find out the greater number in the arguments

def larger_number(x, y):
    if x > y:
        print(x, "is greater")
    else:
        print(y, 'is greater')

larger_number(12, 31)
Posted by: Guest on April-09-2021
0

python how to find the highest even in a list

def highest_even(li):
  evens = []
  for item in li:
    if item % 2 == 0:
      evens.append(item)
  return max(evens)

print(highest_even([10,2,3,4,8,11]))


# Building a function to find the highest even number in a list
Posted by: Guest on June-29-2020

Code answers related to "find largest number python"

Python Answers by Framework

Browse Popular Code Answers by Language