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.6 Subprograms
Libraries
Card
1
of
14
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 14 cards in this set
What is meant by a library?
A set of ready-made subprograms that can be imported and used
Which term describes a subprogram that returns a value?
Function
What is meant by an argument?
A value that is passed into a subprogram when it is called
What is meant by a procedure?
A subprogram that executes code but does not return a value
What is meant by importing a library?
Making the subprograms in a library available for use
Which of these is an example of a built-in procedure?
Print
What does the built-in function input do?
It returns the text that the user types in
Which of these subprograms is a function rather than a procedure?
One that returns the average of a set of numbers
In Python, what must you do before using the random.randint function?
Import the random library
Which statement about procedures and functions is correct?
Functions return a value, procedures do not
A programmer needs to generate random numbers in a game. Why is importing a library better than writing these subprograms from scratch?
The subprograms are already written and tested, saving time
A program uses random.randint(1, 6) to simulate the roll of a die. What is returned by this call?
An integer between 1 and 6
Which statement about Print and Random.randint is correct?
Print can be used straight away, Random.randint must be imported
A programmer imports the random library and writes value = random.random(). What is stored in value?
A float between 0.0 and 1.0