A first example in Python: Finding the average of all even numbers in a list

Опубликовано: 09 Октябрь 2024
на канале: Alexander Hess - Pythonista
1,786
22

In this video, I show a first example of a program written in Python. The task is to find the average of all the even numbers in a list.

By doing so, we learn how the assignment statement works, what the literal syntax for list objects is, how we obtain either a single element from a list or loop over all the elements with a for loop, what kinds of divisions exists, and how to formulate conditions.

PYTHON BOOK
The lecture is based on the free book "Introduction to Python & Programming".
Get it on GitHub: https://github.com/webartifex/intro-t...

SUBSCRIBE
If you like the way I teach and talk about programming and data science, subscribe to this channel.
The videos focus on coding courses and tutorials aimed at managers and students of business administration, enabling them to make better decisions with analyses done in code.

INSTRUCTOR
Alexander Hess, PhD Student
WHU - Otto Beisheim School of Management, Vallendar, Germany

CONTACT
GitHub: https://github.com/webartifex
LinkedIn:   / webartifex  
XING: https://xing.to/webartifex
Facebook:   / webartifex  
Instagram:   / webartifex  
Website: http://www.webartifex.biz
YouTube:    / webartifex  

wa-vid-024