Advertisement
clesiomatias

Parabéns

Mar 8th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. from winsound import Beep as b
  2.  
  3. # lista de frequencias:
  4. f = [528,528,594,528,704,660,528,528,594,528,792,704,
  5.      880,880,1056,880,704,660,594,933,933,880,704,792,704]
  6.  
  7. #lista de tempos em milisegundos:
  8. t = [300,300,500,500,400,1100,200,200,600,600,400,1100,200,
  9.      200,600,400,400,400,1000,200,200,600,600,600,1200]
  10.  
  11. #lista de sílabas da letra:
  12. s = ['PA','RA','BÉNS','PRA','VO','CÊ','NES','SA','DATA','QUE',
  13.      'RI','DA','MUI','TAS','FE','LI','CI','DA','DES','MUITOS',
  14.      'A','NOS', 'DE', 'VI','DA!']
  15.  
  16. for i in range(len(f)):
  17.     #printando a letra segundo a melodia:
  18.     print(s[i],end=' ')
  19.     #Tocando a musica com a biblioteca winsound
  20.     b(f[i],t[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement