Pseudocode Flash Cards
Pseudocode Flash Cards
Define user input in the context of User input is data or information entered by
programming. the user during program execution.
List the basic data types used in The basic data types include Integer, Real,
programming. Char, String, and Boolean.
An integer is used to represent whole
How is an integer represented in
numbers, either positive or negative, such as
programming?
10, -5, or 0.
How can you find the length of a string in You can find the length of a string using the
Python? len() function, e.g., len(word).
How do you convert a string to lowercase in You can convert a string to lowercase using
Python? the lower() method, e.g., word.lower().
How can you declare an array of strings in You can declare it as: DECLARE Usernames
pseudocode? : ARRAY[1:10] OF STRING.
How do you access the first and last elements The first element is accessed with
of an array in Python? Usernames
How do you declare an array of real You can declare it as: DECLARE Price:
numbers in pseudocode? ARRAY[1:5] OF REAL.
What is the output of the calculate_area The output will be 'The area is 15', as the
procedure when called with length 5 and area is calculated by multiplying length and
width 3? width.
How many parameters can functions and Functions and procedures can have zero,
procedures have? one, or many parameters.
Describe the purpose of the sum function in The sum function calculates the total of a
Python. list of numbers.
What is the output of the sum function The output of the sum function when called
when called with arguments 10 and 20? with arguments 10 and 20 is 30.
Describe the purpose of the mean function The mean function calculates the average
in statistics. of a set of numbers.
The median is the middle value in a sorted
Explain the role of the median in a data set. list of numbers, which separates the higher
half from the lower half.
What does the mode function do in The mode function identifies the most
statistics? frequently occurring value in a data set.