sans-titre

Pasted Dec 3, 2026, 5:19 PM1 file24 lines

Scan to open on your phone

Point a camera at the QR code - it opens this exact paste, no app needed.

https://codepastes.com/zzgrpy8y0yrdnqcm
sans-titre
import random

# Liste des choix possibles
choix_possibles = ["pierre", "papier", "ciseaux"]

# Demande du choix du joueur
joueur = input("Choisissez pierre, papier ou ciseaux : ").lower()

# Choix aléatoire de l'ordinateur
ordinateur = random.choice(choix_possibles)

print(f"Vous avez choisi : {joueur}")
print(f"L'ordinateur a choisi : {ordinateur}")

# Détermination du gagnant
if joueur == ordinateur:
    print("Égalité !")
elif (joueur == "pierre" and ordinateur == "ciseaux") \
     or (joueur == "papier" and ordinateur == "pierre") \
     or (joueur == "ciseaux" and ordinateur == "papier"):
    print("Vous gagnez 🎉 !")
else:
    print("L'ordinateur gagne 😢.")

674 chars · codepastes.com