Difference between revisions of "Python Starting"
(→Connect to the CS Server) |
|||
Line 1: | Line 1: | ||
+ | =Running Python Programs= | ||
To get started with Python programming, you need to be able to run the program. Here are some ways to get started... | To get started with Python programming, you need to be able to run the program. Here are some ways to get started... | ||
− | =Install Python= | + | ==Install Python== |
You can install python on your personal computer. You download from [https://www.python.org/downloads/ python.org/downloads], and it normally auto-detects your OS. Click the download button, install it, and open it open after it's installed. | You can install python on your personal computer. You download from [https://www.python.org/downloads/ python.org/downloads], and it normally auto-detects your OS. Click the download button, install it, and open it open after it's installed. | ||
− | =Python Online= | + | ==Python Online== |
There are various websites that provide an online Python environment that you can use in your web browser. Most of these are fine to use to get started. One that we are familiar with that you could try is [https://replit.com/languages/python3 repl.it]. | There are various websites that provide an online Python environment that you can use in your web browser. Most of these are fine to use to get started. One that we are familiar with that you could try is [https://replit.com/languages/python3 repl.it]. | ||
− | =Connect to the CS Server= | + | ==Connect to the CS Server== |
The CS server has python installed. If you have an account for the CS systems (see [[CS Accounts and CS Lab Computers]]) then you can use this account to login to the CS server and run Python in the terminal. See [[CS Server - Terminal]] for how to connect to the CS server. Once you are logged into the server, you can run python in interactive mode by simply running: <code>python3</code> | The CS server has python installed. If you have an account for the CS systems (see [[CS Accounts and CS Lab Computers]]) then you can use this account to login to the CS server and run Python in the terminal. See [[CS Server - Terminal]] for how to connect to the CS server. Once you are logged into the server, you can run python in interactive mode by simply running: <code>python3</code> | ||
Line 15: | Line 16: | ||
If this prints a version that is 2.something, you should use the command python3 to make sure you are using the current version of python (as above). | If this prints a version that is 2.something, you should use the command python3 to make sure you are using the current version of python (as above). | ||
+ | |||
+ | =Reading and Tutorials= | ||
+ | The following are good sources to read when starting out with python. If you are taking a course at ISU that uses python, the course might use one or more of these as required reading material. |
Revision as of 17:02, 20 August 2022
Contents
Running Python Programs
To get started with Python programming, you need to be able to run the program. Here are some ways to get started...
Install Python
You can install python on your personal computer. You download from python.org/downloads, and it normally auto-detects your OS. Click the download button, install it, and open it open after it's installed.
Python Online
There are various websites that provide an online Python environment that you can use in your web browser. Most of these are fine to use to get started. One that we are familiar with that you could try is repl.it.
Connect to the CS Server
The CS server has python installed. If you have an account for the CS systems (see CS Accounts and CS Lab Computers) then you can use this account to login to the CS server and run Python in the terminal. See CS Server - Terminal for how to connect to the CS server. Once you are logged into the server, you can run python in interactive mode by simply running: python3
To run a python program that is in your account on the server, you would run: python3 filename.py
where filename.py
is the name of the file you want to run.
Note that the python
might be running an older version of python (python2). You can tell by running this command: python --version
If this prints a version that is 2.something, you should use the command python3 to make sure you are using the current version of python (as above).
Reading and Tutorials
The following are good sources to read when starting out with python. If you are taking a course at ISU that uses python, the course might use one or more of these as required reading material.