Who created Python?
Guido van Rossum
What kind of programming language is Python?
A high-level, general-purpose programming language.
Name one advantage of Python.
easy to learn, readable, free and open source, widely supported, or available on many operating systems.
What does indentation show in Python?
It shows which statements belong to a particular block of code
What does [print()] do?
It displays information on the screen.
In what year was Python 0.9.0 first released?
1991
What does “dynamically typed” mean for variables?
Programmers generally do not have to declare a variable’s data type before using it
What is one reason Python is beginner-friendly?
Its relatively simple, readable syntax can help beginners focus on programming concepts.
What is a variable?
A named place used to store a value that a program can use or change.
What is a string?
A sequence of characters treated as text, usually written inside quotation marks
Where was Python developed?
At Stichting Mathematisch Centrum (CWI), a research institute in Amsterdam, the Netherlands.
What are libraries and modules used for?
They provide additional functionality programmers can use in their programs.
Name one performance-related disadvantage of Python
Python can be slower than some compiled languages or use more memory than some lower-level language
Give two rules for naming Python variables
A name cannot begin with a number; it can contain letters, numbers, and underscores; it cannot contain spaces; it cannot be a Python keyword; names are case-sensitive
What is an integer?
A whole number without a decimal point. It can be positive, negative, or zero.
What language did Python succeed, and what design goal did its creator pursue?
Python succeeded the ABC programming language. Its creator aimed to make a powerful language that was easier to read, write, and use
Name three fields or industries that use Python
robotics, data science, artificial intelligence, web development, automation, software development, engineering, and research., etc
Explain one situation where Python may not be the best language choice
It may not be the best choice for an application requiring extremely high performance. Some mobile or embedded applications may also be better suited to other languages
What are sequence, selection, and iteration?
Sequence runs instructions in order; selection makes a decision based on a condition; iteration repeats instructions, usually with a loop
What is a function, and why might a programmer use one?
A function is a reusable block of code designed for a specific task. It can organize code and reduce repeated instructions.
What inspired the name “Python”?
Guido van Rossum chose it after the British comedy program Monty Python’s Flying Circus.
Explain how readable syntax and indentation shape the way Python code is written
Python’s relatively readable syntax helps make code easier to understand. Indentation organizes code blocks, such as the statements that belong to a condition or loop
Describe two advantages and one disadvantage of Python
Examples: Python is relatively easy to read and has many libraries; however, it can be slower than some compiled languages.
Explain how incorrect indentation can affect a program
It can cause an [IndentationError] or make the program behave differently than intended.
What does this code do, and how many times does it print “Robot”?
'for i in range(5): '
'print("Robot") '
It repeats the print instruction five times, so “Robot” appears five times