Save
SDD
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Louis Richardson
Visit profile
Cards (57)
What is
Python
?
Python is a high-level
programming language
used to develop software.
View source
When was
Python
first released?
Python was first released in
1991
.
View source
What are the advantages of using
Python
?
Free to download
Easy to install
Works on almost every computer
Comes preinstalled in all Raspberry Pi’s
Extremely readable with
enforced indentation
Uses less code than other languages
Vast number of
useful libraries
Useful error messages
View source
What programming paradigms can Python be used for?
Object-Oriented programming
Imperative programming
Scripting language
Functional programming
Procedural programming
Event-driven programming
View source
What is
Python IDLE
?
Python IDLE stands for
Integrated Development and Learning Environment
.
View source
What features does
Python
IDLE
include?
Multi-window text editor
Syntax highlighting
Auto-completion
Smart indent
Integrated debugger
View source
How do you create a new program in
Python
IDLE
?
Select "New File" from the "File" menu or use the shortcut
Ctrl+N
.
View source
What file extension should all
Python
programs
have?
All Python programs should end in "
.py
".
View source
Why is it important to give meaningful names to
Python
programs?
Meaningful
names help identify the
function
of the program in the future.
View source
What is the purpose of adding comments in
Python code
?
Improve
readability
of the code
Explain what the program is doing
Highlight important sections
Remind the
programmer
of how their code works
View source
How do you start a
multi-line comment
in
Python
?
A multi-line comment starts with
three quotation marks
(""").
View source
How do you add a
single line comment
in
Python
?
A single line comment is added using a
hash (#)
symbol.
View source
What are the rules for naming variables in
Python
?
Must begin with a letter or
underscore
Can include
letters
,
numbers
, or underscores
Case
sensitive
Can be any reasonable length
Cannot use
reserved words
View source
What is a
variable
in
Python
?
A variable is a storage location in memory that can store a value used within a program.
View source
What are the five variable types you need to know for National 4/5 Computing Science?
Integer
Float
Char
String
Boolean
View source
What is the purpose of
type casting
in
Python
?
Type casting is used to change the data type of a variable throughout a program.
View source
What is
input validation
in programming?
Checks if user input is of the
correct type
Ensures input is within the correct range
Uses
Boolean
,
WHILE loops
, and
IF statements
View source
What is the purpose of
arrays
in
Python
?
Store multiple pieces of data in a single data structure
Must contain the same
data type
Each piece of data is identified by an
index
starting at zero
View source
What is the
index
in an
array
?
The index is a
number
that uniquely identifies each piece of information in an array.
View source
What is the
Fibonacci sequence
?
A sequence of numbers where each number is the sum of the two
preceding
ones
Starts with
0
and
1
Example: 0, 1, 1, 2, 3,
5
, ...
View source
What is the purpose of the "
valid age.py
" program?
It checks if the
entered age
is valid (between
0
and
120
).
View source
What should the
program
"
valid password.py
" do?
It should ask for a password and display a message based on the
correctness
of the input.
View source
What is the task of the
program
"valid
year.py
"?
It should ask the user for their name and their current year in
high school
.
View source
What is the significance of the phrase "
Garbage in: Garbage out!
" in programming?
Highlights the importance of
input validation
Indicates that incorrect input leads to incorrect
output
View source
What are
nested loops
used for in programming?
To iterate over
multiple dimensions
of data
To perform
repetitive tasks
within repetitive tasks
View source
What is the task of the
program
"
total calories.py
"?
It asks
pupils
to enter how many calories they had for each meal and totals them up.
View source
What is the task of the
program
"
nested numbers.py
"?
It displays a
specific
pattern using nested
loops
.
View source
What is the task of the
program
that displays the 2
times table
?
It uses
nested loops
to display the 2 times table.
View source
What is the name of the
program
that asks the user for their name and year of
High School
?
valid year.py
View source
What years of High School does the program accept as valid input?
1st
,
2nd
,
3rd
,
4th
,
5th
, and
6th
View source
What is the name of the program that tracks calories for
five
pupils?
total calories.py
View source
What is the
purpose
of the
nested loops
in the calorie tracking program?
Ask each pupil for
calories consumed
at breakfast, lunch, and dinner
Total the calories
for the day
Display the results
View source
What is the name of the
program
that displays a
nested
loop of numbers?
nested
numbers.py
View source
What is the name of the
program
that displays the 2 times table using nested loops?
two times table.py
View source
How many
times
does the example
loop
display "Hello" and what is the final value of the
counter
?
10 times, counter value is
9
View source
How can the user specify how many times the code
loops
in the
example
provided
?
By inputting a number when prompted
View source
What is the name of the
program
that asks the user how many times to display their name?
looped
name.py
View source
What is the name of the
program
that displays numbers 1-20 using a fixed loop?
number line loop.py
View source
What is the name of the program that displays the products of the
2
times table up to 40?
times table loop.py
View source
What is the name of the program that displays
negative
numbers using a fixed loop?
negative number loop.py
View source
See all 57 cards
See similar decks
2.2.3 Blood
AQA GCSE Biology > Unit 2: Organisation > 2.2 Animal Tissues, Organs, and Organ Systems
102 cards
1.1.5 Microscopy
AQA GCSE Biology > Unit 1: Cell Biology > 1.1 Cell Structure
43 cards
2.5 Writing Critical Essays
AQA GCSE English Literature > Paper 1: Shakespeare and the 19th-century novel > 2. The 19th-century Novel
108 cards
2.1 Principles of Organisation
GCSE Biology > Unit 2: Organisation
73 cards
1.3.1 Key Beliefs and Teachings
WJEC GCSE Religious Studies > Unit 1: Religious and Non-Religious Beliefs, Teachings, and Practices > 1.3 World Religions (Choose one: Buddhism, Hinduism, Islam, Judaism, Sikhism)
59 cards
4.1 The role of education in society
AQA GCSE Sociology > 4. Education
86 cards
3.4 Jobs, career choices and ambitions
AQA GCSE Spanish > Theme 3: Communication and the world around us
87 cards
1.1.3 Cell Specialization
GCSE Biology > Unit 1: Cell Biology > 1.1 Cell Structure
48 cards
1.5.4 The Economy and Business
Edexcel GCSE Business > Theme 1: Investigating Small Business > 1.5 Understanding External Influences on Business
46 cards
1.1 Structure and Calculation
GCSE Mathematics > 1. Number
33 cards
2.1.1 Eukaryotic cells
OCR A-Level Biology > Module 2: Foundations in biology > 2.1 Cell structure
108 cards
9.3.2 Conservation
Edexcel GCSE Biology > Topic 9: Ecosystems and Material Cycles > 9.3 Human Impact on the Environment
61 cards
1.2 Carbohydrates
AQA A-Level Biology > 1. Biological Molecules
66 cards
4.2 Vietnam War
AQA GCSE History > BD Conflict and tension in Asia, 1950–1975
128 cards
1.1.3 Describing Energy Changes in a System
AQA GCSE Physics > Unit 1: Energy > 1.1 Energy Stores and Systems
40 cards
2.4 The marketing mix
OCR GCSE Business Studies > 2. Marketing
58 cards
3.4. Wildfires
AQA A-Level Geography > Component 1: Physical Geography > 3. Hazards
49 cards
1.1.2 Structures of Memory
AQA GCSE Psychology > Unit 1: Cognition and Behaviour > 1.1 Memory
53 cards
1.1 The purpose and nature of businesses
AQA GCSE Business > 1. Business in the real world
50 cards
2.2 Types of Long-Term Memory
AQA A-Level Psychology > 2. Memory
37 cards
3.5.1 Traditional Drug Sources
AQA GCSE Biology > Unit 3: Infection and Response > 3.5 Discovery and Development of Drugs
31 cards