NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#Ghost Game
from random import randint #This brings the function randint or random integer from the library random. This function picks a random integer.
print('Ghost Game') #Say Ghost Game
feeling_brave = True
score = 0
while feeling_brave: #This is basically keep going until feeling_brave becomes False
ghost_door = randint(1,3) #ghost door becomes 1,2,or 3 (random because of the randint)
print('Three doors ahead...') #Say Three doors...
print('A ghost behind one.')
print('Which door do you open?')
door = input('1,2, or 3?') #"door" becomes the answer to '1,2, or 3?'
door_num = int(door) #since it's a string, we convert it to an integer that can be used in calculations using int() and then we put it in door_num
if door_num == ghost_door: #if door_num is equal to the ghost_door
print('GHOST!') #say GHOST
feeling_brave = False #Feeling brave becomes false which ends the while loop, because you picked the number of the door the ghost was hiding in
else:
print('No ghost!') #or else, if that isn't true and there isnt a ghost, say No Ghost (new line) you enter the next room
print('You enter the next room.')
score = score + 1 #Adds one to your score. This can be written as score += 1
print('Run away!') #Say Run away
print('Game over! You scored', score) #Say 'Game over! You scored' and then your score so for example Game Over! You scored 5
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.