Exercise

Answer the following questions

  • Which numbers represent False, which True?

  • Does int() round correctly?

  • What happens, if a String does not represent a number?

  • What is the meaning of int('101', 2)?

  • What decimal number represents 4F in hexadecimal system?

  • What is the result of 55 == 55.0? What does that mean?

  • What does the function round()?

  • Can float() transform from different numerical systems, as int() does?

  • What is the result of 0.1 + 0.2 and why?

  • What is the difference between 5 and 5.?

  • What is the meaning of 5+1j?

  • What is the meaning of 5. == 5?

  • What type is the result of

    • 17 // 3

    • 17 // 3.

    • 5. == 5?

  • When is it appropriate to use single/double quotation marks?

  • What do \n and \t mean?

  • How does the format() method work?

  • How do I check, if a string represents a number?

  • How do I check, if a string ends with a certain chain of characters?