PEP8 & Secure Coding


In the first week, you were introduced to state. In the second week, you were introduced to iteration, one of the more difficult programming constructs to grasp. In the third week, we discussed another programming construct: selection. In week four, we reinforced these topics while incorporating file handling. In week five, we used functions to produce organised, maintainable solutions. In week seven, we started to look at creating programs that use graphics. Last week, we built on our week seven study and built a retro snake game with a GUI and various features.

This week, we will use PEP8 to fix the program that we created in week 2, ensuring it conforms to its Style Guide for Python Code. Additionally, we will look at some techniques to make our programs more secure.

image





Click here to go to the COMP16321 Blackboard page


Click anywhere to close this video

Contents



Introduction

Task 1 – PiP Install on Your Personal Computer

Task 2 – Installing the flake8 Package and Configuring With Geany

Task 3 - Creating a Simple Script From Week 3

Task 4 - Functions

Task 5 - Resulting Text

Task 6 - Secure Coding

Task 7 - Secure Coding with Regular Expression

Conclusion


Green = Current Page

Click anywhere to close this overlay

Topics Covered in this Lab



1. PIP Install

2. Flake 8

3. Configuring Geany

4. PEP 8 Standards

5. Writing to Files

6. Validation for Files

7. Secure Coding

8. Validating User Input

9. Regular Expression



Click anywhere to close this overlay

Lab Key



Notes – #FF6F61

Videos – #34568B

Code Examples – #009B77

Downloads - #C3447A

Internal Link (University Resources) – #955251

External Link (Non-University Resources)– #EFC050

Other - #660099



Click anywhere to close this overlay