replit

Before you start this course, you must login to Replit

If you have forgotten your Replit account user name or password, ask your Coder Coach.

CodeSports Logo

1-3-Output-Make

Instructions:

Adapt the code to output your own message. Add comments (use #) to show what each line does.

Learning Goals:


Students will learn to interpret, trace, identify, and use Python code using:

  • Concept
  • Explanation
  • Python Code
  • Examples

Output:


The computer communicates information to the user via print. In this course, the print function will be used to output text to the screen. Examples include:

  • print(“Text goes here”)
  • print(“Hello World!”)

Algorithms:


Algorithms are a sequence of instructions for a specific task

Syntax:


Syntax is the format that code is written in. If code is not written in the correct syntax (or format), it creates a syntax error and the program will not run.

Strings:


Strings are the data type for text, such as words and sentences, that are surrounded by quotations. All string data is treated as text, even if the text is a number. Examples include:

  • “string goes here”
  • “This is a string 123”
  • You can find out more about strings by clicking here.

Help! My Code Does Not Work!


You may encounter some errors in your code, so here are some things that you must do correctly:

  • print does not have a capital P
  • Check for missing () brackets before/after the string
  • Check for missing “” quotation marks before/after the text
  • Do not press inside a string, it will create a new line and you will get an error

Slide Deck:


The link for the slide deck for this topic can be accessed by clicking here.

Hints