Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Demarrage
- import random
- print("Système Opérationnel")
- def start():
- commande1 = str(input("[ENTREZ COMMANDE] [...] : "))
- print("[COMMANDE] [...] : " + str(commande1))
- #Ecrire
- if commande1 == "wrt":
- string1wrt = str(input("[SRRING] : "))
- print("[RESULT] : " + str(string1wrt))
- print("[END]")
- #Calculer+
- if commande1 == "clc+":
- a1 = int(input("[ENTREZ LA VALEUR A]"))
- b1 = int(input("[ENTREZ LA VALEUR B]"))
- r1 = int(a1 + b1)
- print("[RESULT] : " + str(r1))
- print("[END]")
- # Calculer-
- if commande1 == "clc-":
- a2 = int(input("[ENTREZ LA VALEUR A]"))
- b2 = int(input("[ENTREZ LA VALEUR B]"))
- r2 = int(a2 - b2)
- print("[RESULT] : " + str(r2))
- print("[END]")
- # Calculer*
- if commande1 == "clc*":
- a3 = int(input("[ENTREZ LA VALEUR A]"))
- b3 = int(input("[ENTREZ LA VALEUR B]"))
- r3 = int(a3 * b3)
- print("[RESULT] : " + str(r3))
- print("[END]")
- # Calculer/
- if commande1 == "clc/":
- a4 = int(input("[ENTREZ LA VALEUR A]"))
- b4 = int(input("[ENTREZ LA VALEUR B]"))
- r4 = int(a4 + b4)
- print("[RESULT] : " + str(r4))
- print("[END]")
- # LenghtStr
- if commande1 == "len":
- string1len = str(input("[ENTREZ UN STRING]"))
- result1len = int(len(string1len))
- print("[RESULT] : " + str(result1len))
- print("[END]")
- #Pierre feuille papier ciseaux
- if commande1 == "pfpc":
- playerOBJ = str(input("[ENTREZ EN MAJUSCULE L'OBJET]"))
- computerOBJv = random.randint(1, 4)
- print("[COMPUTER-VALUE] : " + str(computerOBJv))
- computerOBJ = "R"
- if computerOBJv == 1:
- computerOBJ = "PIERRE"
- if computerOBJv == 2:
- computerOBJ = "FEUILLE"
- if computerOBJv == 3:
- computerOBJ = "PAPIER"
- if computerOBJv == 4:
- computerOBJ = "CISEAUX"
- print("[PLAYER] : " + str(playerOBJ))
- print("[COMPUTER] : " + str(computerOBJ))
- print("[END]")
- if commande1 == "moy3":
- note1 = int(input("Entrez la première note."))
- note2 = int(input("Entrez la seconde note."))
- note3 = int(input("Entrez la dernière note."))
- resultatmoy = (note1 + note2 + note3) / 3
- print("[MOYENNE] : " + str(resultatmoy))
- print("[END]")
- if commande1 == "moy2":
- note12 = int(input("Entrez la première note."))
- note22 = int(input("Entrez la seconde note."))
- resultatmoy2 = (note12 + note22) / 2
- print("[MOYENNE] : " + str(resultatmoy2))
- print("[END]")
- if commande1 == "moy4":
- note13 = int(input("Entrez la première note."))
- note23 = int(input("Entrez la seconde note."))
- note33 = int(input("Entrez la troisième note."))
- note43 = int(input("Entrez la dernière note."))
- resultatmoy3 = (note13 + note23 + note33 + note43) / 4
- print("[MOYENNE] : " + str(resultatmoy3))
- print("[END]")
- if commande1 == "moy11":
- note14 = int(input("Entrez la première note."))
- note24 = int(input("Entrez la seconde note."))
- note34 = int(input("Entrez la troisième note."))
- note44 = int(input("Entrez la quatrième note."))
- note54 = int(input("Entrez la cinquième note."))
- note64 = int(input("Entrez la sixième note."))
- note74 = int(input("Entrez la septième note."))
- note84 = int(input("Entrez la huitième note."))
- note94 = int(input("Entrez la neuvième note."))
- note104 = int(input("Entrez la dixième note."))
- note114 = int(input("Entrez la dernière note."))
- resultatmoy4 = (note14 + note24 + note34 + note44 + note54 + note64 + note74 + note84 + note94 + note104 + note114) / 11
- print("[MOYENNE] : " + str(resultatmoy4))
- print("[END]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement