« All Events
6 PM – Intro to Python – Daniel (Joshua Sub)
July 17 @ 6:00 pm - 7:00 pm
What to Review for the Next Test
- We Went Over While Loop Homework
- remember, all while loops need either a break or a way to turn the conditional from true to false
- Notes to Review Homework
- f”strings” and string methods
- To put variables within f”strings” remember to use {}
- when creating a new line with \n, don’t put a space
- Ex. f”I like pie.\nPie tastes good.”
- .lower(), .upper(), .title(), .capitalize()
- Variable Types
- what is considered an int, string, list, etc and how to create one
- If,elif,else
- remember to indent and the colon
- Remember to use ==,>,<,<=,>=
- For loops and range
- how to write a simple for loop (Ex. for <variable> in <list_name>:)
- range() creates a list of numbers that you can use in your for loops
- range(int) will create a list starting from zero that is as long as the int
- range(int,int) will create a list starting from the first number and ending 1 before the second
- Inputs
- input_value =input(prompt)
- the input_value is default a string. you may need to switch it to a number with int()
- Remember that their may be capitalization mistakes with their input.
- “Hi” and “hi” are not the same, so you may need to use .lower() or another string method to make your code work
- Make sure you study up your code and tell Daniel if you can not attend next class.
- If you have any questions, email me at dmeng@ayclogic.com