back to top

Can You Pass This Basic Coding Test?

Hello, world!

Posted on

There are eight questions in this quiz that will test how well you know basic coding principles, using the programming language Python. You just need to work out what each piece of code does, and choose the correct answer. Ready?

  1. 1.

    Correct
    Incorrect
    Put the words "Hello, world!" on to the computer screen
    Correct
    Incorrect
    Send the words "Hello, world!" to any connected printer
  2. 2.

    Correct
    Incorrect
    Put the word "bae" on the computer screen
    Correct
    Incorrect
    Put the number "200" on the computer screen
  3. 3.

    Correct
    Incorrect
    Put "Hello Taylor" on the screen
    Correct
    Incorrect
    Put "Hello, Taylor" on the screen
  4. 4.

    Correct
    Incorrect
    Puts the number 2 on the screen
    Correct
    Incorrect
    Prints the number 8 to the screen
    Correct
    Incorrect
    Prints the number 10 to the screen
  5. 5.

    Correct
    Incorrect
    Prints the number 45 to the screen
    Correct
    Incorrect
    Prints the number 25 to the screen
  6. 6.

    Correct
    Incorrect
    It does nothing.
    Correct
    Incorrect
    It prints the text "a is 2".
  7. 7.

    Correct
    Incorrect
    Prints "a is 1", "a is 2", "a is 3" etc, until "a is 10", then stops.
    Correct
    Incorrect
    Prints "a is 1" ten times on the screen.
  8. 8.

    Correct
    Incorrect
    Prints "a is 5", "a is 6", "a is 7", "a is 8".
    Correct
    Incorrect
    Prints "a is 5, 6, 7, 8".

Kelly Oakes is science editor for BuzzFeed and is based in London.

Contact Kelly Oakes at kelly.oakes@buzzfeed.com.

Got a confidential tip? Submit it here.

Promoted
Take quizzes and chill with the BuzzFeed app.