PROGRAMMING IN PYTHON
PRACTICE EXAM QUESTIONS
WITH CORRECT DETAILED
ANSWERS | ALREADY GRADED
A+<RECENT VERSION>
1) An online platform offering data science and analytics courses - ANSWER Data
Camp
2) A comprehensive course for learning Python programming - ANSWER
Springboard Python course
3) A program that translates Python code into machine code - ANSWER Python
compiler
4) Extracting a portion of a sequence like a string or list in Python - ANSWER
Slicing
5) A notable resource for learning programming through tutorials and guides -
ANSWER Corey Schaefer
6) A collection of programming tutorials and resources - ANSWER Bro Code
Playlist
,7) Converting a value to a different data type, e.g., int('1') returns 1 as an integer -
ANSWER Type conversion/casting
8) Enforcing order of operations using parentheses, e.g., 3 * (2+1) = 9 - ANSWER
Precedence
9) Using type() to find the data type of a variable or value - ANSWER Data type
check
10) An ordered and changeable collection in Python allowing duplicates - ANSWER
List
11) An unordered and immutable collection in Python, allowing addition/removal but no
duplicates - ANSWER Set
12) An ordered and unchangeable collection in Python, allowing duplicates and faster
operations - ANSWER Tuple
13) Unable to be changed, e.g., tuple elements - ANSWER Immutable
14) Dividing integers to get the whole number part of the quotient - ANSWER Floor
division
15) Estimates average calories burned based on age, weight, heart rate, and time -
ANSWER Calories burned equation
16) Using math library for operations like power, absolute value, and square root -
ANSWER Math functions
17) Calculating frequencies of keys on a piano based on initial key frequency -
ANSWER Frequency calculation
18) Time taken for a substance to reduce to half its original value - ANSWER Half-life
, 19) Outputting price change and estimated monthly mortgage based on current and last
month's price - ANSWER House real estate summary
20) Calculating product and average of floating-point numbers, rounding and formatting
the output - ANSWER Simple statistics
21) Determining the season based on input date and month, considering days in each
month - ANSWER Northern hemisphere seasons
22) Spring: March 20 - June 20, Summer: June 21 - September 21, Autumn: September 22
- December 20, Winter: December 21 - March 19 - ANSWER Seasons
23) A year with 366 days, occurring every 4 years and divisible by 4, except for century
years not divisible by 400 - ANSWER Leap Year
24) Primary highways: 1-99, odd for north/south, even for east/west. Auxiliary: 100-999,
servicing the rightmost two digits of the primary highway - ANSWER Interstate
Highway Numbers
25) Score names: 'Eagle' (2 less than par), 'Birdie' (1 less), 'Par' (equals par), 'Bogey' (1
more); 'Error' if par not 3, 4, or 5 - ANSWER Golf Scores
26) Used for multiple choices. 'if' for an option, 'elif' for alternatives, 'else' as the final
option if none apply - ANSWER Conditional Statements
27) Used to iterate a specific number of times or through elements in a list - ANSWER
For Loop
28) Used to iterate until a condition is met, breaking based on a condition rather than a
specific number of iterations - ANSWER While Loop