Eric functioning

Function Challenge

Challenge: Highest Even Number

This challenge has no exercises, and no pyBox. Just you, VS Code and everything you have learned so far.

The goal is simple to describe but requires you to think logically and connect multiple concepts together. This is what real programming looks like.

The Challenge

Create a file named highest_even.py in your part53 folder.

Write a function that takes a list of numbers as an argument. The list will contain both even and odd numbers. Your function must return and print only the largest even number from that list.

Test your function with the following list:

[1, 7, 11, 2, 8, 10]

The correct answer is 10.

Rules

Hints

If you are stuck, think about the following questions before reaching for Google:

Work through each question one step at a time. Each one is a concept you already know. The challenge is connecting them together.

Don't Forget to commit and Push!

This course was built by DevSTEM - we turn teaching materials into interactive web courses like this one.

Build your own course