Skip to content

Latest commit

 

History

History
105 lines (95 loc) · 1.72 KB

File metadata and controls

105 lines (95 loc) · 1.72 KB

img

Python programming quizes

Question #0

What does this commandline print?

>>> a = "Python is cool"
>>> print(a[4])
  • 0
  • P
  • n
  • h

Question #1

What does this commandline print?

>>> a = "Python is cool"
>>> print(a[7:])
  • cool
  • Python i
  • Python is
  • is cool

Question #2

What does this commandline print?

>>> a = "Python is cool"
>>> print(a[:6])
  • Python is
  • Pytho
  • Python
  • is cool

Question #3

What does this commandline print

>>> print("Holberton school")
  • Holberton school
  • Holberton
  • "Holberton school"
  • 'Holberton school'

Question #4

What does this commandline print?

>>> print(f"{98} Battery street")
  • 9 Battery street
  • 98 Battery street
  • f"98 Battery street"
  • 8 Battery street

Question #5

Who created Python?

  • Guido van Rossum
  • Julien Babier
  • Yukihiro Matsumoto

Question #6

What does this commandline print"

>>> a = "Python is cool"
>>> print(a[-2])
  • o
  • ol
  • l
  • Nothing

Question #7

What does this commandline print?

>>> a = "Python is cool"
>>> print(a[0:6])
  • Python is
  • Python
  • Pytho
  • Python is cool

Question #8

What does this commandline print?

>>> a = "Python is cool"
>>> print(a[7:-5])
  • Python
  • nohtyP
  • on
  • is
  • si

Question #9

What does this commandline print?

>>> print(f"{98} Battery street, {'San Francisco'}")
  • 98 Battery street, San Francisco
  • “98 Battery street, San Francisco”
  • 8 Battery street, San
  • San Francisco Battery street, 98