
LECTURE 06 Flashcards(26.11.2025)
Flashcard
•
Engineering
•
University
•
Practice Problem
•
Hard
fgv fgv
FREE Resource
Student preview

20 questions
Show all answers
1.
FLASHCARD QUESTION
Front
True or False: A Python script is a file you run to start your program.
Back
True
2.
FLASHCARD QUESTION
Front
True or False: A Python module is a file you use in another program to use its code.
(Study tip: Try making two Python files and use import in one to use code from the other.)
Back
True
3.
FLASHCARD QUESTION
Front
Which word tells you if a Python file is being run or used in another file?
(You can print `__name__` in your file and run it in a compiler to see what it shows.)
Back
__name__
4.
FLASHCARD QUESTION
Front
True or False: Code inside `if __name__ == "__main__":` only runs when you run the file. (You can test this by putting a print statement inside this block and running/importing the file.)
Back
True
5.
FLASHCARD QUESTION
Front
Which one is NOT a step in making software?
Back
Importing
6.
FLASHCARD QUESTION
Front
True or False: The main reason for `if __name__ == "__main__":` is to make a main() function.
Back
False
7.
FLASHCARD QUESTION
Front
When you use a Python file in another file, which code does NOT run?
(Study tip: Try importing a file with different code blocks and see what happens.)
Back
Code inside `if __name__ == "__main__":`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?