Coding with Python G12 Lesson 8 PDF
Document Details
Uploaded by AttentiveHeliotrope3672
Qimam El Hayat International School
Tags
Summary
This document is a lesson on coding with Python for grade 12 students at Qimam El Hayat International Schools. It covers topics such as finding the minimum and maximum values in a list and calculating the sum of the elements in a list.
Full Transcript
To be an ever-evolving school that fosters tech-oriented, highly skillful, well balanced, and future ready successful students Kingdom of Saudi Arabia Qimam El Hayat International Schools CODING WITH PYTHON...
To be an ever-evolving school that fosters tech-oriented, highly skillful, well balanced, and future ready successful students Kingdom of Saudi Arabia Qimam El Hayat International Schools CODING WITH PYTHON G12 LESSON 8 THE TITLE : FINDING THE MINIMUM AND THE MAXIMUM Active Learning To be an ever-evolving school that fosters tech-oriented, highly skillful, well balanced, and future ready successful students Kingdom of Saudi Arabia Qimam El Hayat International Schools SCHOOL VALUE RESPECT ADDING TWO NUMBERS CHALLENGE Create a code to subtract two numbers Create a code to multiply two numbers IN THE BELOW PROGRAM, YOU WILL EXPLORE HOW TO WRITE A PROGRAM TO DISPLAY THE MINIMUM AND MAXIMUM VALUES OF A LIST. IN THE ABOVE PROGRAM, YOU USED A FUNCTION AND THE 2 COMMANDS “MIN” AND “MAX” TO FIND OUT THE MINIMUM AND MAXIMUM VALUES IN A LIST. IN THIS EXERCISE, YOU WILL LEARN ANOTHER METHOD TO SEARCH FOR THOSE VALUES. CHALLENGE WRITE A PYTHON FUNCTION THAT TAKES A LIST OF NUMBERS AS INPUT AND RETURNS THE SUM OF ALL THE ELEMENTS IN THE LIST. THE ANSWER