Signing up for a Python IDE

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

  1. Open up your stu.smuhsd email and find a Cloud 9 invitation from the teacher to sign up.
  2. Click the sign-up link in the invitation. Do not go directly to c9.io without the invitation.
  3. Enter your Name (yes, your real name) in the box provided Initial Sign Up Photo
  4. Create a username ahs19LastNameFirstname (All in lowercase, no Underscore). The username will be used to create your personal c9.io URL.
    Example: ahs19reisskris
    
    Username Photo
  5. Select Student for the kind of developer
  6. Select Coursework for how you will use Cloud About Photo
  7. Confirm account details on the next page (Just click next)
  8. Confirm that you are not a robot robot photo
  9. Click Join Team
  10. Go to email and reset password
  11. Sign in again. Note: Arrow button at top right of screen is a Sign Out button
  12. Student should have access to shared team workspace:team workspace photo

Creating a New Workspace

  1. Click the plus sign to Create a new workspace
  2. In “Workspace name” field enter
    intro2017
    
  3. Give it a description of Workspace for AHS Python projects
  4. Make your workspace private
  5. Select Python Template button
  6. Click Create workspace at the bottom of the page Filled in workspace photo
  7. This will take a few seconds to set you up, but it will look like this:Cloud9 empty workspace photo
  8. From the top panel select window, pick share (third choice from the top) Cloud9 window to share
  9. 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. 
    Cloud9 Share options photo

Creating a New File

  1. Click the plus button near the top of the page to create a new fileCreating a new file photo
  2. 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

Parts of the IDE
  1. File tree
  2. Bash/terminal
  3. 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:
  1. Right mouse click on the Run button at the top of the Cloud9 Python window
  2. Select Manage... from the pull down that appears
  3. On the Project Settings window that appears, scroll down to Python Support
  4. On the scroll list that appears to the right of the heading Python Version:, select the Python 3 entry
  5. Exit the Preferences Tab on the line right below top line starting with Cloud9 and containing the Run button.

Running Python

  1. In the bottom half of the screen there should be a tab called "bash"
  2. If there is not a tab called "bash", click the plus button and choose "new terminal" New terminal photo
  3. To run the interactive shell: type python3 into the prompt Interactive shell
  4. To run a file: type python3 lab3_greetings.py or use the name of the file you are trying to run

No comments:

Post a Comment

Blog information move to Google Doc

Hello All, Moving forward, please find all information about the class that you used to find on a live google doc agenda. The link is foun...