Back to Chapters
Chapter Progress: 0 %0 / 5 Lessons Read
‹›

2. Data Types and Operators

2.5 Chapter 2 test

Highlights & notes

Select lesson text to highlight it, or tap Add note.

    Bookmarks

    Bookmark a lesson to see it here.

      Nine questions on types, conversion, operators and strings: three Easy, three Medium and three Hard.

      Question 1 · Easy

      What type is True?

      Question 2 · Easy

      What does 9 // 2 give?

      Question 3 · Easy

      s = "data". What is s[0]?

      Question 4 · Medium

      What does float("2.5") * 2 give?

      Question 5 · Medium

      code = "IN-2026". What is code[3:]?

      Question 6 · Medium

      What does " Hi ".strip().upper() give?

      Question 7 · Hard

      What does print(int("3") + int(4.9)) show?

      Question 8 · Hard

      x = 10, then x = x % 4 * 2. What is x?

      Question 9 · Hard

      What does print("5" * 3) show?

      Key takeaways

      Score 7 or more out of 9 before moving on. If you missed a question, reread its lesson and try again.

      Lesson 9 of 67

      Save your progress

      Start free and your progress, code and notes stay saved. Free for 1 month, no card needed.

      Start free Log in
      PreviousChapter 2 test
      Save your progress free for 1 month. Start free · Log in