cs chapter 6

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/3

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:29 PM on 10/13/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

4 Terms

1
New cards

define code readability

ensuring any code written is easy to read and understand it is necessary as programmers usually work in teams with each programmer developing a different part of the program. This only works if they adopt a standard approach to writing readable code

2
New cards

what are the 4 techniques to improve code readability

comments: used to explain what each part of the program does

descriptive names: using descriptive identifiers for variables, constants and sub programs helps to make their purpose clear


indentation: makes it easier to see where each block of code starts and finishes. Getting indentation wrong in python will lead to program not running or not producing expected outcomes


white space: adding blank lines between different blocks of code makes them stand out

3
New cards

define block of code

a grouping of two or more code statements

4
New cards

how to write comments in python

starting the line of a comment with a # or *** for multiple line statements (end with *** as well)