Advertisement
obernardovieira

Dias da semana

Nov 8th, 2013
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. dias = ["segunda","terca","quarta","quinta","sexta","sabado","domingo"]
  2. def diassemana ( dia_s) :
  3.     if int(dia_s) in range(1,7) :
  4.         print(dias[int(dia_s)-1])
  5.     else :
  6.         print("Introduza um dia da semana valido!")
  7.         dia = input('Introduza o dia da semana: ')
  8.         diassemana (dia)
  9.     return;
  10.  
  11. dia = input('Introduza o dia da semana: ')
  12. diassemana (dia)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement