Python Programming Basics
Test your knowledge of fundamental Python programming concepts including variables, functions, selection statements, iteration, errors, and algorithms.
Questions
Comments in code are used....
- To explain the code
- To ask the coder how he/she is doing
- To make the code work
- To avoid a syntax error
In computer programming, what is a variable ?
- Not consistent or having a fixed pattern; liable to change
- Somewhere to store functions
- Names used to store one or morevalues e.g. a users ages
- A symbol that represents a quantity
A small section of a program that performs a specific task repeatedly, e.g. displaying results
- Compilers
- Procedures
- Functions
- Modules
What is the name given to the keywords that perform specific tasks (examples: "print" "input")?
- Selections
- Debuggers
- Functions
- Procedures
This type of error occurs when the logic used to code the program failed to solve the problem
- Syntax
- Logic
This type of error occurs when the code is not formatted or typed correctly
- Syntax
- Logic
This symbol is used when you want to add comments to your code
- #
- &
- $
- *
This is useful for planning and writing algorithms, half english, half code.
- Debugger
- Algorithm
- Psuedocode
- Script
What is a logical sequence of steps that follow in solving a problem referred to as?
- Plan
- Instructions
- Pseudocode
- Algorithm
if, else and elif are what type of statements?
- Loops
- Selection
- Iteration
- Procudure
Which statement is used for iteration?
- if
- while
- when
- elif
What is iteration?
- A process of looping or repeating sections of a program
- A process of fixing a program
- A program that uses selection
- A program that performs bug checks continuously