Advertisement
Zafichi

hw1

Dec 9th, 2019
1,284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1.
  2. name = 'Oleg'
  3. my_wife = 'Nastia'
  4. my_daughter = 'Ameli'
  5.  
  6. some_str = f'My name is {name}! I have a wife {my_wife} and a daughter {my_daughter}!'
  7. print(some_str)
  8.  
  9. 2.
  10. for i in range(-50, 379):
  11.     if i % 3 == 0 and i % 7 == 0:
  12.         i = 'foobar'
  13.     elif i % 3 == 0:
  14.         i = 'foo'
  15.     elif i % 7 == 0:
  16.         i = 'bar'
  17.  
  18.     print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement