Highlights from this week:
-Decision control in python relies on Boolean logic anything not false (zeros (0,0.0) empty sequences, false sequences and nothings) are true.
- learned about conditionals (there are three; and,or,if with the if statement being the most common) which checks whether or not a statement is true as a condition for running. Just like in jeroo, if statements that contain elif statements offer the user more control over the code.
-comparison operators such as <,>,=<,>=,==,=! also evaluate true or false
-nested conditionals are confusing to read. Python allows the user to simplify by using comparison operators
-while loops may be used to repeat certain sections of code until a defined condition is met
ex. a=0
while a<5
means that this loop will continue to run until a is equal to five.
-for loops are a lot like while loops but they are preferrable to while loops when it comes to listing things
ex. for variable in range (1,50) will assign the numbers 1-49 to variable
Lab:
-Finished with lots of help. Realized that one of my problems was not reading the pre-lab or the lab thoroughly enough to understand the task which, as you can imagine, doesn't help. I need to slow down. Thank goodness Mr. Tessler was willing to help me...Hopefully i can start to do more of the lab on my own next week. Mini-goal for 2/11-2/16, SET!
No comments:
Post a Comment