Objective: Use for loops on Python to solve simple math problems
Warm-up (in your notebooks):
Suppose weekday = True, raining=False, and hot=False. Which of the following are true?
• weekday and raining
• not hot and weekday
• not hot and (weekday or raining)
• hot or weekday or raining
- Type along: for loops and lists in Python.
- Start pythonanywhere
- Create a file called for_loop_examples.py
- for loop and list examples
- Finish pig_latin_sentence()
- for loop & list challenge
- minimum(num_list) - return the minimum number in a list
- mean(num_list) - return the average number in a list as a floating point number
- print_odds(num_list) - given a list of positive integers, print only the odd numbers in the list