Différences entre les versions de « Utilisateur:Clairebravo »

De {}
Aller à la navigation Aller à la recherche
Ligne 40 : Ligne 40 :
  
 
--------------------
 
--------------------
 +
 +
## c'est un script qui remplace des mots de la poésie du corbeau et du renard, par d'autres mots aléatoires
  
 
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">

Version du 25 octobre 2021 à 09:47

print("tu t'es couché à quelle heure hier?")

hour = input("je me suis couché à ")

print(f"ah, tu t'es couché à " + hour + " heure!")

hour = int (hour)


if hour < 21 :
    print ("c'est tôt, t'as du bien dormir")
elif hour < 23 : 
    print ("ah, une bonne nuit de sommeil alors!")
elif hour > 23 : 
    print ("t'as l'air fatigué mon con")


----------------------

print("comment ça va?")

answer = input("oh, aujourd'hui ça va ")

print(f"ah, tu vas" + answer + "...!")



if answer == "bien" :
    print ("nice, bonne journée alors")
elif answer == "bof" : 
    print ("ça ira mieux demain")
elif answer == "pas bien":
    print ("ah......")
elif answer == "super":
    print ("yay!")

    1. c'est un script qui remplace des mots de la poésie du corbeau et du renard, par d'autres mots aléatoires

<syntaxhighlight lang="python">

import time import random mots1 = ["Corbeau", "Cachalot", "Caméléon", "Canard"] mots2 = ["arbre", "immeuble", "pont", "grillage"] mots3 = ["fromage", "pétard", "savon", "enfant"] mots4 = ["Renard", "Requin", "Rat", "Renne"] mots5 = ["language", "rap", "slam", "speech"] memoire = []


print("ah t'es là toi! vite fait comme ça, ça te dis une poésie?")

answer = input("oui ou non? ")

while answer == "non" :

   print (" ah... ")
   time.sleep(2)
   print (" bon... ")
   time.sleep(2)
   print (" attends... ")
   time.sleep(2)
   print ("je vais te répéter, tu as surement mal compris ma question ")
   answer = input("oui ou non?")

if answer == "oui" :

   print (" La poésie c'est suivre son cœur en allant à la fête. je te laisse méditer sur ça ")
   print (" on va faire un jeu, créons une poésie ensemble : ")
   print (" tu connais un certain corbeau et son pote le renard?")
   time.sleep (5)


   indice1 = random.randint(0,3)
   indice2 = random.randint(0,3)
   indice3 = random.randint(0,3)
   indice4 = random.randint(0,3)
   indice5 = random.randint(0,3)


print (f"Maître {mots1[indice1]}, sur un {mots2[indice2]} perché,") time.sleep (2) print (f"Tenait en son bec un {mots3[indice3]}.") time.sleep (2) print (f"Maître {mots4[indice4]}, par l'odeur alléché,") time.sleep (2) print (f"Lui tint à peu près ce {mots5[indice5]} :") time.sleep (2)

print (f" ça change un peu non? attends je te remontre : ") time.sleep (6)

print (f"Maître {mots1[indice1]}, sur un {mots2[indice2]} perché,") time.sleep (2) print (f"Tenait en son bec un {mots3[indice3]}.") time.sleep (2) print (f"Maître {mots4[indice4]}, par l'odeur alléché,") time.sleep (2) print (f"Lui tint à peu près ce {mots5[indice5]} :") time.sleep (2)

print (f" allez, un dernier pour la route : ") time.sleep (6)

print (f"Maître {mots1[indice1]}, sur un {mots2[indice2]} perché,") time.sleep (2) print (f"Tenait en son bec un {mots3[indice3]}.") time.sleep (2) print (f"Maître {mots4[indice4]}, par l'odeur alléché,") time.sleep (2) print (f"Lui tint à peu près ce {mots5[indice5]} :") time.sleep (2)