Get startedGet started for free

Run code vs. submit answer

On the right, you'll see the area where you can write and execute Python scripts and the IPython console. In this exercise, you will practice submitting code. The output of this code will be shown in the IPython Shell. The IPython Shell can also be used interactively to type and execute commands. The code entered directly in IPython shell is not checked for correctness, so it is a great place to experiment.

You can submit your script to check for correctness by hitting Submit Answer. Note that you can also use Take Hint or Show Answer if you're stuck.

This exercise is part of the course

Introduction to Python for Finance

View Course

Exercise instructions

  • Hit the Run Code button and observe that the code in your script is executed in the IPython Shell.
  • Next, hit the Submit Answer to execute the code and check it against the solution.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Example 1, do not modify!
print(8 / 2)

# Example 2, do not modify!
print(2**2)
Edit and Run Code