lundi 16 janvier 2017

Assignment (chatbot)

My task:

Create a menu option which makes the bot print the date and time of today, a random mood, an integer and a float. Everything should be put together in a string sentence.

This is what I have got so far which I think I should use. The problem is I'm not certain how to put it all together.

def dateandfeels():
    """
    docstring
    """
    today = (time.strftime("%H:%M:%S"))
    time1 = (time.strftime("%d/%m/%Y"))
    whole = int(15)
    float1 = float(0.056)
    mood = ['happy', 'sad', 'moody', 'pythonic']
    moody = (random.choice(mood))

    print("""Today is {today}. Time is {time1}. My number of choice is {whole}
    and my float of choice is {float1}. Also I'm feeling a bit {moody} today""")

If anyone could provide some help or tips on how to get this going I would be grateful.




Aucun commentaire:

Enregistrer un commentaire