INTRODUCTION TO PYTHON
PROGRAMMING AND DATA STRUCTURES
EXAM SCRIPT UPDATED QUESTIONS AND
ACCURATE ANSWERS FULL SOLUTION
●● What data type is 3.14?
Answer: Float
●● What follows the in keyword in a for loop?
Answer: Iterable
●● Which loop is used when the number of iterations is known?
Answer: for
●● A while loop requires:
Answer: Condition + indented block
●● Which keyword exits a loop early?
Answer: break
●● In for item in list, item is:
, Answer: Value
●● Which structure prevents duplicates?
Answer: Set
●● Which is immutable?
Answer: Tuple
●● To run Python code from a file:
Answer: Save + interpreter
●● Advantage of integrated terminal:
Answer: No switching apps
●● Navigate directory command:
Answer: cd
●● Interactive Python tool:
Answer: Shell
●● Slice last 3 characters:
Answer: (-3:)
PROGRAMMING AND DATA STRUCTURES
EXAM SCRIPT UPDATED QUESTIONS AND
ACCURATE ANSWERS FULL SOLUTION
●● What data type is 3.14?
Answer: Float
●● What follows the in keyword in a for loop?
Answer: Iterable
●● Which loop is used when the number of iterations is known?
Answer: for
●● A while loop requires:
Answer: Condition + indented block
●● Which keyword exits a loop early?
Answer: break
●● In for item in list, item is:
, Answer: Value
●● Which structure prevents duplicates?
Answer: Set
●● Which is immutable?
Answer: Tuple
●● To run Python code from a file:
Answer: Save + interpreter
●● Advantage of integrated terminal:
Answer: No switching apps
●● Navigate directory command:
Answer: cd
●● Interactive Python tool:
Answer: Shell
●● Slice last 3 characters:
Answer: (-3:)