Python practice: Hello, Python

Chapter 1 · 7 questions · free to solve

  1. Question 1 · easy

    What is a program?

    Which statement best describes a computer program?

    Solve it in your browser
  2. Question 2 · easy

    Hello, World!

    Every programmer's first program. Print exactly:

    Hello, World!
    
    Solve it in your browser
  3. Question 3 · easy

    Three lines of code

    Print these three lines in order:

    Welcome to Python
    Day 1
    Let's code!
    
    Solve it in your browser
  4. Question 4 · easy

    Numbers do not need quotes

    Print the number 42 followed on the next line by the sum 2 + 3 (let Python calculate it, don't print the text "5"):

    Solve it in your browser
  5. Question 5 · easy

    Print multiple values

    Print Apples: 5 Oranges: 3 using a single print() statement with commas between items:

    Solve it in your browser
  6. Question 6 · easy

    Add code comments

    Add a comment # Calculate total on line 1, then print 118.0 by calculating 100 * 1.18 on line 2:

    Solve it in your browser
  7. Question 7 · easy

    Fix syntax error

    Fix the syntax error in this broken code snippet:

    print("Q1 Sales Report)
    
    Solve it in your browser

These questions are free.

Make a free account to solve them, with instant checking and an AI tutor for hints.

Start free