Master Python

Section quiz

Contents

Contents

Master Python

0 of 253 complete

Section quiz

First steps

Six questions on print, quotation marks, the arithmetic you get for free, and the first errors.

Questions are shuffled within each part, and so are the answers. You can retake it as often as you like.

0 of 6 answered

Part 1: Text, numbers and print

Question 1

Which of these writes out Total: 750?

Question 2

What does print("2 + 2") write out?

Question 3

What does print("3" + "4") write out?

Part 2: When it goes wrong

Question 4

What does print("Use # for comments") write out?

Question 5

print("Age:" + 30) stops the program. Which error is it, and why?

Question 6

A problem asks for a function called double. You write def double(n): and then, indented under it, print(n * 2). The right numbers appear on the screen and every test fails. Why?

6 questions left to answer.