homewor_unsolved_defs_17_18

# write a def that takes 3 arguments: a start number (int), a stop number (int) and a boolean variable, called as flag, which would take either 
# True value or False. Its operation would be to produce all the prime numbers between start and stop variable and print them on screen if flag is # equal to Tes, otherwise just ti return them.
# 
def primes(start, stop, flag):
  

  return

print primes(2,21,Yes) -> [2,3,5,7,11,13,17,19]


# write a def that takes 3 arguments: a start number (int), a stop number (int) and a str variable, called as digit_q, which would take as value
# one of the 10 different digits. Its operation would be to produce all the numbers between start and stop variable that contain digit_q and print # them on screen.
# 
def search_digits(start, stop, digit_q):
  

  return

print primes(1,65,'5') -> [5,15,25,35,45,55,65]

 

Posted in Uncategorized