May 10 Sample Program

posted May 10, 2016, 7:57 AM by Attila Lengyel
import random
import time
import os

def rps():
    guess = random.randint(1,3)
    if guess == 1:
        print("ROCK")
    elif guess == 2:
        print("PAPER")
    elif guess == 3:
        print("SCISSORS")

for x in range(1,15):
    time.sleep(1)
    os.system("clear")
    time.sleep(1)
    print("...Rock...")
    time.sleep(1)
    print("...Paper...")
    time.sleep(1)
    print("...Scissors...")
    time.sleep(1)
    rps()

Comments