Advertisement
elizeub

Arvore de Natal em Caracteres Python

Jul 15th, 2021
1,925
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. from random import choice
  2. print('{:.>40}'.format('FELIZ NATAL'))
  3. print('{:.^40}'.format('FELIZ NATAL'))
  4. print('{:.<40}'.format('FELIZ NATAL'))
  5.  
  6. for n in range(10):
  7.     a = n+1
  8.     n = str(n)
  9.     n = ['M' * a]
  10.    
  11.     arvore = choice(n)    
  12.     print('{:.^40}'.format(arvore))
  13. for z in range(4):
  14.     tronco = '#' * 2
  15.     print('{:.^40}'.format(tronco))
  16.    
  17. print('{:^>40}'.format(''))
  18. print('{:^>40}'.format(''))
  19. print('{:^>40}'.format(''))
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement