Literals

6 important questions on Literals

What can you do to write down a literal number in a more readable way?

Write it down with underscores: 1_000_000

What is the prefix for an octal value?

0o (zero-O) print(0o123)

What is the prefix for a hexadecimal value?

0x (zero-x) print(0x123)
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What is the short way of writing down 300000000

3e8 (3*10^8)

What are two ways to output quotes in a string?

Backslash double quote: print("I like \"Monty Python\"")
apostrophe bouble quote:  print('I like "Monty Python"')

Other way around works too :)

What is the result:
print(True < False)

False

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo