Why it worked
This video likely performed well due to its niche educational content targeting individuals interested in Python programming. The quiz format encourages engagement and learning, appealing to a specific audience seeking to test or improve their coding knowledge.
Summary
The video presents a Python quiz with code displayed on screen. It shows a Python script that defines a function to print a salary, with the salary variable being reassigned within the function. The quiz likely asks about the output of this script.
Structure
- 1Introduction of Python Quiz #3
- 2Display of Python code with variable assignment and function definition
- 3Function call and potential output question
On-screen text
Python Quiz #3
salary = 8000
def printSalary():
salary = 12000
print("Salary:", salary)
printSalary()