fork download
  1. def print_odd_numbers(start, end):
  2. """Prints odd numbers within the range [start, end]."""
  3. for num in range(start, end + 1):
  4. if num % 2 != 0:
  5. print(num)
  6. print_odd_numbers(1,10)
  7.  
  8. def pattern_f(rows):
  9. """Prints the pattern with the specified number of rows."""
  10. for i in range(rows):
  11. if i == 0 or i == rows // 2 or i== rows //2 and i==0:
  12. print('*' * (rows // 2 + 1))
  13. else:
  14. print('e')
  15.  
  16. pattern_f(7)
  17.  
  18.  
Success #stdin #stdout 0.02s 7164KB
stdin
Standard input is empty
stdout
1
3
5
7
9
****
e
e
****
e
e
e