Skip to main content

Style Guide

Style Guide

Programs are easier to read and to understand when they are written in a familiar style and follow standard coding conventions. Most organizations that develop software therefore require programmers to write programs that follow the organization’s preferred style and coding conventions.

Programs are generally written once, read many times, and edited over and over again. Style conventions help both you and any other programmer using your code to more easily understand what you were thinking when you wrote the code.

Pyret Programs

For Pyret programs, we follow the style guide conventions outlined at https://pyret.org/docs/latest/Pyret_Style_Guide.html. Please note, in particular, conventions on line length and variable naming.

Significant violations of this guide may result in deductions on HW assignments.

Python Programs

For Python programs, we follow the style guide conventions outlined at https://peps.python.org/pep-0008/.

As with Pyret programs, significant violations of the guide may result in deductions on HW assignments.