#!/usr/bin/env python import time import os import re def clear(): os.system("cls") #for windows os.system("clear") #for mac, linux def prompt(a, b, c): switch = False while (switch == False): input = raw_input('>') if (re.search(a, input)): switch = True print b else: print c switch = False clear() print 'MAKE IT TO SCHOOL \nWITH MR. YOUNG \nBY WILL THOMPSON, YORK CHEN, AND JAMES BUCKLAND' time.sleep(2) print '\nMARCH 18, 2012. THE DAY AFTER SAINT PATRICK\'S DAY.' time.sleep(1) print '7:48 AM' time.sleep(1) print '\nGroggily, you awaken on a SUBWAY PLATFORM.' time.sleep(1) print 'SHAMROCKS and EMPTY BOTTLES surround you.' time.sleep(1) print 'Suddenly there\'s a SINKING FEELING in your stomach - and this time, it\'s not from the ALCOHOL.' time.sleep(2) print 'It\'s MONDAY, and you\'re MR. YOUNG!' time.sleep(1) print 'Can you make it to SCHOOL by FIRST PERIOD?\n' time.sleep(2) input = raw_input('PRESS ENTER TO CONTINUE') clear() print 'You hear a rumbling in the distance.' time.sleep(1) print 'Sitting upright, you rub your eyes just in time to see the train approach the station.' prompt('train', 'What, like this? You\'re not standing up, buddy!', 'Sorry, what? Dude, get on the TRAIN!') prompt('up', 'This isn\'t turning out to be as easy as you\'d hoped. You stumble to your feet, just in time for the TRAIN to come to rest.', 'What are you waiting for? GET ON THE TRAIN ALREADY!') prompt('train', 'Shaky, you put one foot in front of the other, until... WHAM! You fool! The DOORS aren\'t even open yet!', 'Get. On. The. Train.') prompt('wait', 'It\'s getting late... Ding! The DOORS are open!', 'Dude, just WAIT. Come on.') prompt('door', 'Those are the DOORS! Very good! You found them!', 'Here we go. You take a running start, and... WHAM! Right into the side of the TRAIN. PASSENGERS look at you suspiciously. Try the DOORS next time.') prompt('train', 'You got on the TRAIN!', 'Dude, get on the TRAIN.') time.sleep(1) print 'It\'s a 6 TRAIN, alright. Good job, you!' time.sleep(1) print 'You check the flashing sign... 96TH STREET, ten stops!' time.sleep(2) clear() print 'Do you dare NAP or STAY AWAKE investigating DR. ZIZMOR\'S treatments for seborrhea or rosacea?' switch = False while (switch == False): input = raw_input('>') if (re.search(input, 'nap')): time.sleep(1) clear() print 'You awaken upstate.' time.sleep(1) print 'As the subway train pulls to a stop, you see INTERN DOLEN LE.' time.sleep(1) print 'He approaches the train car carrying a stack of FRESHLY GRADED CS PAPERS in one hand...' time.sleep(1) print 'and a BRAN MUFFIN in the other.' time.sleep(1) print 'You bow your head in your hands.' time.sleep(1) print 'What MISTAKES have you made to deserve this?' time.sleep(1) print 'It\'s 8:53.' time.sleep(1) print 'Here\'s to a day of coding with the LEs.' time.sleep(1) print 'GAME OVER' exit() if (re.search(input, 'awake')): switch = True print 'You wait... it\'s getting later...' time.sleep(1) clear() print 'Monday, March 18, 2012.' time.sleep(1) print '8:00 am.' time.sleep(1) print '\nOnly eight minutes left before FIRST PERIOD! Better round that up to ten. It\'s not like the STUDENTS will be there on time. Little buggers...' time.sleep(1) print 'Luckily, the train is pulling into the 96TH STREET STATION. And the DOORS are opening!' prompt('train', 'You walk right into a POLE. Nice job.', 'Dude, what are you waiting for? Get off the train already!') prompt('door', 'You found the DOORS again. Right where you left them.', 'Gotta find the DOORS, man.') prompt('train', 'You walk right through the DOORS onto the PLATFORM! Amazing work, considering. \nFollowing the crowd, you manage to find yourself at a crossroads between four STAIRCASES; the NE, NW, SE, and SW corners of the intersection above. \nIt\'s getting later, choose carefully...', 'Gotta get off the TRAIN, dude.') switch = False while (switch == False): input = raw_input('>') if (re.search(input, 'NE')): switch = True print 'Nice job. No, really! The worst choice you could have made. It\'s, like, 8:03. Good luck with that.' if (re.search(input, 'NW') or re.search(input, 'SE')): switch = True print 'Nice try! But you could have done better. Still, only 8:03. You could still make it!' if (re.search(input, 'SW')): switch = True print 'Oh man. Oh man. I bet the kids are gonna be so proud of this one. Saving, like, ten seconds here. What a champ. Still, it\'s getting late. 8:03. Hurry up.' else: print 'What are you doing? Choose a staircase already!' time.sleep(3) clear() print 'You\'re aboveground, finally.' time.sleep(1) print 'Your FRAIL BODY aches from the sheer minutes of PURE STRESS and ADRENALINE.' time.sleep(1) print 'You hold up a HAND to block out the BLINDING SUNLIGHT as years of HORRIBLE, GRUELING EXPERIENCE guide you quickly through the streets to...\n' time.sleep(2) print 'BREAKFAST. COFFEE at SING\'S?' time.sleep(1) print 'Or get a ride to NORTH BERGEN NEW JERSEY to find the nearest DAIRY QUEEN for a BLIZZARD?' switch = False while (switch == False): input = raw_input('>') if (re.search(input, 'queen') or re.search(input, 'blizzard')): time.sleep(1) clear() print 'It\'s 8:33, too early for Dairy Queen, they say. But not in England! You sit back and nurse your morning Blizzard. \nYou are satisfied in knowing you made the right choice commuting so much out of your way for ice cream goodies instead of preparing your students for the AP. \nToo bad you\'re LATE TO SCHOOL' time.sleep(1) print 'GAME OVER' exit() if (re.search(input, 'coffee') or re.search(input, 'sing')): switch = True print 'Good call. You get the COFFEE and slowly trapse towards...' time.sleep(1) clear() print 'HUNTER COLLEGE HIGH SCHOOL itself, a horrific behemoth towering over your TIRED FRAME.' time.sleep(1) print 'Luckily, CLASS is only on the... the FOURTH FLOOR?' time.sleep(1) print 'Really? Dang it.' prompt('class', 'Have you learned nothing? Jim Morrison would be disappointed.', 'Dude, get to CLASS already!') prompt('door', 'Good, good. We are LEARNING, then. \nYou\'re IN! \nYou pass the SECURITY DESK. \nEither it\'s EMPTY, or they DON\'T NOTICE YOU. \nMaybe they\'re just not having a good morning either. \n8:05. \nYou can still make it.', 'FIND THE DOORS!') prompt('class', 'You begin to climb the STAIRCASE, when... BAM! Out of nowhere! Your INTERN DOLEN LE appears, carrying a stack of FRESHLY GRADED TESTS for you to look over.', 'Dude. Get to CLASS.') prompt('ignore', 'Good choice. You dash up the stairs. It\'s 8:07... Almost there...', 'He starts to talk about COMPUTER SCIENCE or some shit. God, if only he would shut up... it\'s 8:06. You haven\'t got time for this. You gotta just IGNORE HIM.') time.sleep(1) clear() print "WAIT." time.sleep(1) print "OH NO." time.sleep(1) print "THE CLASSROOM IS EMPTY." time.sleep(1) print "WITH A SINKING FEELING IN YOUR STOMACH AND A RINGING IN YOUR EARS, YOU STUMBLE TO YOUR OFFICE TO FIND... THERE, ON THE WALL OF YOUR OFFICE. A CALENDAR." time.sleep(1) print "YOU RUB YOUR EYES." time.sleep(1) print "SAINT PATRICK\'S DAY IS ON A SATURDAY." time.sleep(1) print "YESTERDAY WAS SAINT PATRICK\'S DAY." time.sleep(1) print "IT\'S SUNDAY." time.sleep(1) print "..." time.sleep(1) print "WHAT THE HELL IS DOLEN DOING AT SCHOOL?" time.sleep(1) exit()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question