Fetch
Decode
Explain
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Login
Menu
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Qualifications
Edexcel GCSE Computer Science
6.1 Develop code
Readability
Card
1
of
17
0
got it
0
still learning
Question
Evil question
Tap
Click or press space
to see the answer
Answer
Still learning
Got it
Turn over
Shuffle
0%
Round complete
Go again with the ones I'm still learning
Start the whole set again
Choose another set
All 17 cards in this set
In Python, how is a single line comment started?
With the # symbol
Why should a programmer add comments to a program?
To explain what the code does to other programmers
A program contains comments on several lines. What happens to these comments when the program is translated and run?
They are ignored by the translator
Why is indentation used in a program?
To show which statements belong to the same block
A program uses the variable names a, b and c to store a length, a width and an area. Which change would make the program easier to understand?
Rename the variables so they describe what they store
What is the benefit of leaving blank lines between sections of a program?
It separates groups of statements so the code is clearer
A program mixes its input, processing and output statements in no particular order. Which change would improve the layout of the program?
Group related statements together into clear sections
A team of programmers read through each other's code to find errors and suggest improvements. What is this called?
A code review
Why does it matter that a program is written so that it is easy to read and understand?
Other programmers can maintain and update it more easily
Which term describes the text added to a program to explain what the code does, which is ignored when the program is run?
Comments
What is meant by indentation?
Moving lines of code inwards from the left margin
What is the name for writing variable and subprogram names that describe what they store or do?
Meaningful identifiers
What is meant by white space?
Using blank lines and spaces to separate parts of a program
Which term describes the way the sections of a program are arranged and set out on the page?
Layout
A program has a comment on every line, such as 'add one to the score' next to the statement 'score = score + 1'. Why is this poor practice?
They repeat what the code already says
A development team reads through each other's code before releasing an update. What is the main benefit of doing this?
Faults and poor practice are spotted by another programmer
A programmer is adding a comment to the top of a new program. Which comment is most useful for other programmers?
What the program does and who wrote it