Python Online Editor Sign Up
We will be using the online IDE cloud9 to write python code this semester. Below are instructions for how to sign up, name a file, create a new file, and turn in a file. Refer back to this sheet if you are having difficulties.
Note: If you have an existing Cloud9 account, skip to Creating a New Workspace
Sign Up Instructions
- Open up your stu.smuhsd email and find a Cloud 9 invitation from the teacher to sign up.
- Click the sign-up link in the invitation. Do not go directly to c9.io without the invitation.
- Enter your Name (yes, your real name) in the box provided

- Create a username ahs19LastNameFirstname (All in lowercase, no Underscore). The username will be used to create your personal c9.io URL.
Example: ahs19reisskris
- Select Student for the kind of developer
- Select Coursework for how you will use Cloud

- Confirm account details on the next page (Just click next)
- Confirm that you are not a robot

- Click Join Team
- Go to email and reset password
- Sign in again. Note: Arrow button at top right of screen is a Sign Out button
- Student should have access to shared team workspace:

Creating a New Workspace
- Click the plus sign to Create a new workspace
- In “Workspace name” field enter
intro2017 - Give it a description of Workspace for AHS Python projects
- Make your workspace private
- Select Python Template button
- Click Create workspace at the bottom of the page

- This will take a few seconds to set you up, but it will look like this:

- From the top panel select window, pick share (third choice from the top)

- Enter your teachers' username in the "Invite People" section - this shares your workspace with your teachers and allows them to add comments.
mrreiss meiyang mikehahn #Lindsay Zhong will put her user name here later.
Creating a New File
- Click the plus button near the top of the page to create a new file

- Enter this into your editor:
# Script Header Information
# Created by: last_name, first_name
# Date: 01/10/2017
# Description: My first Python script
print("hello world")
# Create a function that appends any name to "hello world"
def greetings(name):
print("hello world, " + name)
# Call and run the previously defined function with the name "Susan"
greetings("Susan")
3.Press Ctrl-s to save the file. Enter the filename:
lab3_greetings.py
and press the save button
Parts of the IDE

- File tree
- Bash/terminal
- Editor
You can ignore the other parts for now!
Running Python3 via Run Button Set Up
Cloud9 Python defaults to Python 2.7.6. It can be changed to use Python 3.4.3 by doing the following:
- Right mouse click on the Run button at the top of the Cloud9 Python window
- Select Manage... from the pull down that appears
- On the Project Settings window that appears, scroll down to Python Support
- On the scroll list that appears to the right of the heading Python Version:, select the Python 3 entry
- Exit the Preferences Tab on the line right below top line starting with Cloud9 and containing the Run button.
Running Python
- In the bottom half of the screen there should be a tab called "bash"
- If there is not a tab called "bash", click the plus button and choose "new terminal"

- To run the interactive shell: type
python3into the prompt
- To run a file: type
python3 lab3_greetings.pyor use the name of the file you are trying to run
No comments:
Post a Comment