Skip to content

Instantly share code, notes, and snippets.

@InFog
Created May 28, 2012 11:41
Show Gist options
  • Save InFog/2818721 to your computer and use it in GitHub Desktop.
Save InFog/2818721 to your computer and use it in GitHub Desktop.
Sorte do dia usando o Fortunes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from os import system
print("Olá, bem vindo ao Sorte do Dia!")
nome = ""
while nome == "":
nome = str(raw_input("Qual é o seu nome? "))
print("Olá, %s" % (nome))
sorte = str(raw_input("Você deseja saber a sorte do dia? (s/n): "))
if sorte == "s":
system("fortune")
else:
print("Ok, tchau!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment