Chapter 2 GETTING STARTED Flashcards
What is programming?
Writing instructions for a computer to execute.
The instructions might tell the computer to print Hello, World! , scrape data from the internet or read the contents of a file and save them to a database. These instructions are called_____
code
Python is an open-source programming language created by_____and it was named after ________
Dutch programmer GUIDO VAN ROSSUM AND named after the British sketch comedy group, Monty Python’s Flying
Circus .
One of van Rossum’s key insights was that programmers spend more time_____than _____ so he created an easy-to-read language
reading
code than writing it,
_____ is one of the most
popular and easiest to learn programming languages in the world.
Python
Why is there a high demand for Python programmers?
It runs on all the major operating systems and computers and is used in everything from building web servers to creating desktop applications. Because of its popularity, there is a large demand for Python programmers.
Python comes with a program called ?
IDLE
What does IDLE stand for
Interactive Development Environment
Where do you type your python code?
IDLE
The interactive shell is useful for 3 main things
Quick computations
Testing small bits of code
Writing short programs you don’t plan on using again.(you can also save a program for reuse?
When you run your code, the output of the code you wrote will appear in the
interactive shell
Python files have to end with
.py
Short examples are best run using the _____ and the text editor is better for_____programs if you want to ____ and ______
Shell; longer programs; save and edit.
How is using the In the interactive shell differ from using the text editor? ,
if you make a mistake in your code—a typo for example—and the code doesn’t work, you have to type
everything again. Using the text editor lets you save your work, so if you make a mistake, you simply edit the mistake and rerun the program.
Another reason the distinction between using the interactive shell and the text editor is important is the _____. Explain
output of a program running from a file versus the shell can be slightly different. If you type 100 into the interactive shell and
press enter, the interactive shell will output 100 . If you type 100 into a .py file and run it, there will be no output. This difference can cause confusion, so be mindful of where you are running a program from if you do not get the same output as the example.