fbpx

Hello World!

It's time to write your first Python program!

Throughout this course, you will be provided with hands-on coding examples that will help reinforce your learning as you progress through the material. These examples will all be provided through Repl.it, an online Integrated Development Environment (IDE) that allows you to compile and run Python code.

Create your Repl.it Account

If you haven’t already, you’ll need to create an account: https://replit.com/signup

Once you’ve created an account, you’ll also need to join the Intro to Python team, where you’ll be able access each of the assignments.

Make sure that in a separate tab, you are signed into your Repl.it account, as this will allow you to see the embedded assignments like the one below. If you do not see the “Hello World!” assignment directly below, you may need to ensure that you are signed into Repl.it in another tab and then refresh the page.

Exploring the Replit Interface

In the frame above, take a minute to familiarize yourself with the Replit interface and the tools it provides. There is a lot that we can utilize within Replit, but we will be focusing on just a few key features throughout each of the assignments:

  • The main.py file: this is the executable Python file where you will write your code. Notice that in this example, there is just a simple one-line print statement.
  • The instructions or markdown tab: Each assignment will have a particular set of instructions to follow in order to practice a given topic. This is a very basic example, so there aren’t really details instructions here, but as we progress through the content you will be required to write more robust programs.
  • The console tab: The console is the primary way that we will collect input and output from the user. Click the run button at the top of the frame and notice what appears in the console. 
  • The shell tab: We won’t spend much time in the shell until some of the later modules, but this is very similar to a command line or Powershell program on a Windows machine, or the Terminal app on a Mac.
  • The left sidebar: The sidebar on the far left part of the frame allows you to navigate between files, as well as explore a number of different tools like Python docs, a debugger, and settings. We will not be utilizing these much in our learning, so feel free to click the “close sidebar” button in the top left if you want to hide this.

 

Try changing the text contained within the quotation marks of the print statement, and then click run. Congratulations! You just wrote your first Python program!

Submitting Assignments

Whenever you feel like you have successfully completed an assignment according to its specifications, click “submit” in the top right. This is a helpful way to monitor your progress through the material, and later on view sample solutions to each of the assignments.

Loading...