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.

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

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

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

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

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

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

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

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

Can You Pass This Basic Coding Test?

Take quizzes and chill with the BuzzFeed app.
Get the app
Take quizzes and chill with the BuzzFeed app.
Get the app

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