Friday, January 10, 2020

1.3 Lesson Slides (2020)

1.3 Using the Text Editor Lesson Slides


Creating a New File


  1. To create a new text file, you can click My Repls, the the button +new replt
  2. Choose python as your chosen language and you're good to go.

  3. Generally, you type in scripts (programs of more than one line of code) into the text editor:
  4. TYPE this script into your text editor:
# Script Header Information
# Created by: last_name, first_name
# Date: 12/18/2017
# Description: My first Python script

# Create a function that starts with any name. Indent 4 spaces after def.
def greetings(name):
    print(name + "'s first Python script!" )

# Create a another function just for fun
def sayItaLot(nTimes):
    print("The world loves me !  " * nTimes )

# Main Script. Call the previously defined functions 

print("hello world")

greetings("Dave")

sayItaLot(5)
3. Replt.it should save your work as long as you have internet access. Generally, however, you should press Ctrl-s to save the file. You will now save this as a python file. This will allow the text editor to interpret your text as python keywords.

Parts of the IDE










  1. File tree
  2. Console/terminal
  3. Editor

Due Monday January 13, 2020: 
  1. In class: knowledge of how to run a script via repl
  2. Classwork/Homework: 
    • Repl.it Assignments:
      • Read Snakify Lesson 1 Theory and then complete these exercises on repl.it:
      • Sum of Three Numbers
      • Area of a right triangle
      • Apple Sharing

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...