Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

jsfakjfkjadjfksajfa

import random
import keyboard
import time
print("Welcome to Text Adventures!")
time.sleep(1)
print("Press up arrow key to start the game and down arrow key for credits.")
check = True
while check == True:
    if keyboard.is_pressed("up"):
        check == False
        break
    elif keyboard.is_pressed("down"):
        print("Credits:")
        print("Ilikepie928 [Scripter]")
playing_game = True
def print_m(talk,wait):
    print(talk)
    time.sleep(wait)
print_m("Ur just a broke college student starting a new life.",1)
print_m("You remembered you had an exam toomorow.",1)
user_choice = str(input("Do you want to go to the exam?(y/n)
"))
GotoExam = "n/a"
if "y" in user_choice:
    GotoExam = str("true")
else:
    GotoExam = str("false")
time.sleep(1)
if GotoExam == "true":
    print_m("It is a beautiful morning outside, you woke up getting ready for school.",1)
    print_m("You arrived on school just in time for your exam.",1)
    print_m("Teacher: Class get ready for your last term exam! If you pass this exam you are going to graduate from college.",1)
    totalscore = int(0)
    i = int(0)
    for i in range (1,11):
        random_number1 = int(random.randint(3,15))
        random_number2 = int(random.randint(3,15))
        user_ans = int(input(f"{i}.) {random_number1} + {random_number2} ="))
        if user_ans == random_number1 + random_number2:
            totalscore = int(totalscore + 1)
        else:
            pass
    print(f"{totalscore}/10")
 
PREVIOUS NEXT
Tagged: #jsfakjfkjadjfksajfa
ADD COMMENT
Topic
Name
8+9 =