Introduction to Python and Google Colab: difficulty 2

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

For each expression below, state exactly what Python produces - the value and its type, or the error raised. Then state the general rule that all six illustrate.

  1. "3" + "4"
  2. 3 + 4
  3. int("3") + 4
  4. "3" * 4
  5. 3 == 3.0
  6. 3 + "4"

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Introduction to Python and Google Colab Questions: