Python (2022-05-02 - 2022-05-05)#
Topics#
Basics#
Exercise: Exercise: Determine Maximum of Two Numbers (see Github)
Control Flow and Iteration#
Encoding, Strings, and File I/O#
Excursion: CAN Communication, OO, Modules#
Live hacking
Send values from a list
Wrap sensor around list, giving values cyclically - maintaining the cycle by hand
Enter itertools — Functions creating iterators for efficient looping (
itertools.cycle()
)
See Github
Modules#
CSV#
Functions#
CSV, Functions#
Exercise: Refactoring - Extract CSV Reading Into Function (csv.reader)
Exercise: Refactoring - Extract CSV Reading Into Function (csv.dictreader)
Exercise: Refactoring - Extract Both CSV Formats Into Module
Live coded that, see Github
PyPI, Virtual Environments#
Requirements Engineering, Test Driven Development#
Live coding on the CSV code base, see Github
More On DataTypes#
Random Topics#
Links#
Books#
Python Beginner Tutorials#
5 Common Python Mistakes and How to Fix Them, by Corey Schafer
Python Quick Tip: F-Strings - How to Use Them and Advanced String Formatting, by Corey Schafer
Python Tutorial for Beginners 4: Lists, Tuples, and Sets, by Corey Schafer
Python Tutorial for Beginners 5: Dictionaries - Working with Key-Value Pairs, by Corey Schafer
Python Tutorial for Beginners 7: Loops and Iterations - For/While Loops, by Corey Schafer
Python Tutorial for Beginners 8: Functions, by Corey Schafer
10 Python Tips and Tricks For Writing Better Code, by Corey Schafer
Python Tutorial: Using Try/Except Blocks for Error Handling, by Corey Schafer