Unit 1: Flashcards
What is python named after?
You might think that it’s named after the snake, but it’s actually named after the comedy TV show “Monty Python’s Flying Circus!”
When did work on Python began in ____ and the current version that we’re using, ______, was released in _____.
Work in Python began in the 1980s and the current version that we’re using, version three, was released in 2008.
When you install Python on your computer, it comes with an application called “____” which is an abbreviation for __________ .This is where you _______.
When you install Python on your computer, it comes with an application called “IDLE”, which is an abbreviation for Integrated DeveLopment Environment. This is where you write your programs and it includes simple features like colouring your programs to show you what commands you’ve used.
Does IDLE work the same on any kind of computer?
Yes, it works the same for a Mac or Windows Computer.
What is the most important aspects of Python?
To make sure that the code written is readable.
How do you make sure that the code written in Python is readable?
This is done by using white space, another word for indentation or the amount of space to the left of your code
What can you use Python to do?
Python is fun— what profession you might want to have in the future
Once you learn Python, you can start working with other tools like Raspberry Pi, for which Python is the main language.
you can add on to your Python skills with PyGame, a library for games made in Python.
Sci-fi is another library that helps with math, science and engineering research.
Big companies like Google, Yahoo, Disney and IBM and websites like Pinterest, New York Times and Instagram all use Python as a baseline for their organisations.
Python supports other languages, like the mapping system GIS , or Java and even C++
How to download python?
Visit the official python website
https://www.python.org/downloads/
Select the latest version
Click install and follow the instructions
Make sure you check the box that says “Add Python to PATH: at the bottom of the setup window.
Go to the window key and search for IDLE—> click open
Click on new file to type in your code and then click on run–> run module
Take a look at the version of Python shown below, where the version is 3.9.4:
Python 3.9.4 (v3.9.4:1f2e3088f3, Apr 4 2021, 12:32:44)
[Clang 6.0 (clang-600.0.57)] on Darwin
Type “help”, “copyright”, “credits” or “license()” for more information.
»>
When you open up IDLE, is your installed Python version 3.X.X, where X can be any numbers?
No
What do you see and do when you’ve installed Python and opened it for the first time?
You should have a screen open that says on the first line “Python: and then the version number of what version of Python you have, followed by some other information. This is called the Python shell.
Always make sure that you have this (»> symbol) showing at the left part of the screen. This is called the prompt and it lets you know that Python is ready and waiting for you to do something.
What is the print command about and how do you code it?
The first command we’ll learn about is called the print command. This has Python print something inside the window.
To code this command
print (“….”) the …. Is what you are trying to say
This “print” is your first _______
This “print” is your first program.
What is a program?
A program is a set of instructions or commands that tells the computer what to do.
How to save and open programs?
With IDLE open, go to file and then new file.
Type your code. ( you should be toying your code in the space where there is no Python version and no arrow»_space;> symbol in this window) One other way to tell that you’re writing (with the arrow prompt»> your code in the right place is that you see the Run command. If you’re in the shell window, you won’t have the Run command on your toolbar
Go to file and save
Go to run and then run module or hit F5 on your keyboard.
Can you save what you typed in shell?
No
How do you open an existing Python program file?
- Open IDLE
- Go to file and then Open…
- Navigate to where the file on your computer is and click Open.
How to edit an existing Python program?
Open an existing Python program file.
Make edits to the program and save the file.
Run the new program.