WorksheetsIntro to Python
Total questions: 7
Worksheet time: 4mins
Which of the following is the correct extension of the Python file?
.python
.pl
.py
.p
Who developed Python programming language?
Dennis Ritchie
Bjarne Stroustrup
Guido van Rossum
Alan Turing
Is Python primarily an interpreter or a compiler language?
Compiler
Interpreter
Which of the following statements create a dictionary?
d = {}
d = {“john”:40, “peter”:45}
d = {40:”john”, 45:”peter”}
What will be the output of this Python statement?
c
ab
cd
ac
What is a recommended strategy for learning and mastering Python syntax?
Memorize every Python syntax rule and exception
Consult ancient scrolls written by Python sages from centuries past
Practice writing code regularly and experiment with different syntax constructs
Enroll in a secret Python monastery where monks teach the ways of syntax enlightenment
If you encounter a Python syntax error, what action should you take to troubleshoot the issue?
Carefully review the error message and examine the code for mistakes
Cast a spell of debugging and hope for a miracle
Sacrifice a Pythonic goat to appease the syntax gods
Perform a ritual dance around the code editor to ward off evil syntax spirits
