Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python Quiz – Conditionals and Loops

Python Quiz Python Quiz


Python Quiz - Conditionals and Loops

at the beginning



if None:

    print("Hello")



for i in [1, 0]:

    print(i+1)



i = sum = 0



while i <= 4:

    sum += i

    i = i+1



print(sum)



while 4 == 4:

    print('4')



for char in 'PYTHON STRING':

  if char == ' ':

      break



  print(char, end='')

  

  if char == 'O':

      continue

Python Quiz Python Quiz