diff --git a/Python Games/hangman/hangman.py b/Python Games/hangman/hangman.py new file mode 100644 index 0000000..15d2e48 --- /dev/null +++ b/Python Games/hangman/hangman.py @@ -0,0 +1,143 @@ +import random +print("Welcome to Hangman!") +print() +print ("There is two game modes: single word or sentance.") +inp = input ("Type '1' for single word or '2' for sentance.") +while not(inp.isdigit() and len(inp)==1 and (inp=="1" or inp =="2")): + inp = input ("Stop. Please type 1 or 2.") +inp = int(inp) +print() +if inp == 1: + print("Welcome to word mode.") + print("Your goal is to guess the word within 6 guesses.") + n = open("nouns.txt","r") + strn = n.readlines() + r1= random.randint(0,len(strn)-1) + word = strn[r1] + word = word[0 : len(word)-1] + #print(word) + guesses = 6 + gword = "" + for i in word: + gword+="*" + print(gword) + print() + gword="" + letters = [] + tryw = [] + print("Guesses " + str(guesses)) + while guesses>0: + letter = input("Guess a letter: ") + print() + if len(letter)>1: + print("Guess only one letter.") + print() + continue + if letter.isdigit(): + print("Bro what are you doing? I said put a letter.") + print() + continue + if letter in letters or letter in tryw: + print("You already guessed that letter!") + print("Try a diffrent one.") + print() + continue + if letter.isupper(): + letter.lower() + if word.count(letter) > 0: + num = word.count(letter) + print("There are "+ str(num)+" " + letter.capitalize() +"(s).") + letters.append(letter) + for i in word: + if i in letters: + gword+=i + else: + gword+="*" + print(gword) + print() + if gword == word: + print("You guessed the word!") + break + gword="" + else: + tryw.append(letter) + print("Sorry the word does not have a "+ letter.capitalize()) + guesses-=1 + print("Guesses Left: " + str(guesses)) + print() + if guesses == 0: + print("You ran out of guessses.") + print("The word was " + word) + +elif inp == 2: + + print("Welcome to sentance mode.") + print("Your goal is to guess the scentance within 6 guesses.") + s = open("sentences.txt","r") + strs = s.readlines() + r2= random.randint(0,len(strs)-1) + sentence = strs[r2] + sentence = sentence[0 : len(sentence)-2] + sentence = sentence.lower() + #print(sentence) + guesses = 3 + gsen = "" + for i in sentence: + if i == " ": + gsen += " " + else: + gsen+="*" + print(gsen) + print() + gsen="" + letterss = [] + trys = [] + print("Guesses " + str(guesses)) + while guesses>0: + letter = input("Guess a letter: ") + print() + if len(letter)>1: + print("Guess only one letter.") + print() + continue + if letter.isdigit(): + print("Bro what are you doing? I said put a letter.") + print() + continue + if letter in letterss or letter in trys: + print("You already guessed that letter!") + print("Try a diffrent one.") + print() + continue + + if sentence.count(letter) > 0: + num = sentence.count(letter) + print("There are "+ str(num)+" " + letter.capitalize() +"(s).") + letterss.append(letter) + + + for i in sentence: + if i in letterss: + gsen+=i + elif i == " ": + gsen+=" " + else: + gsen+="*" + print(gsen) + print() + if gsen == sentence: + print("You guessed the sentence!") + break + gsen="" + else: + trys.append(letter) + print("Sorry the sentence does not have a "+ letter.capitalize()) + guesses-=1 + print("Guesses Left: " + str(guesses)) + print() + if guesses == 0: + print("You ran out of guessses.") + print("The sentence was " + sentence) + +else: + print("Please type 1 or 2.") diff --git a/Python Games/hangman/nouns.txt b/Python Games/hangman/nouns.txt new file mode 100644 index 0000000..672484c --- /dev/null +++ b/Python Games/hangman/nouns.txt @@ -0,0 +1,1525 @@ +people +history +way +art +world +information +map +two +family +government +health +system +computer +meat +year +thanks +music +person +reading +method +data +food +understanding +theory +law +bird +literature +problem +software +control +knowledge +power +ability +economics +love +internet +television +science +library +nature +fact +product +idea +temperature +investment +area +society +activity +story +industry +media +thing +oven +community +definition +safety +quality +development +language +management +player +variety +video +week +security +country +exam +movie +organization +equipment +physics +analysis +policy +series +thought +basis +boyfriend +direction +strategy +technology +army +camera +freedom +paper +environment +child +instance +month +truth +marketing +university +writing +article +department +difference +goal +news +audience +fishing +growth +income +marriage +user +combination +failure +meaning +medicine +philosophy +teacher +communication +night +chemistry +disease +disk +energy +nation +road +role +soup +advertising +location +success +addition +apartment +education +math +moment +painting +politics +attention +decision +event +property +shopping +student +wood +competition +distribution +entertainment +office +population +president +unit +category +cigarette +context +introduction +opportunity +performance +driver +flight +length +magazine +newspaper +relationship +teaching +cell +dealer +finding +lake +member +message +phone +scene +appearance +association +concept +customer +death +discussion +housing +inflation +insurance +mood +woman +advice +blood +effort +expression +importance +opinion +payment +reality +responsibility +situation +skill +statement +wealth +application +city +county +depth +estate +foundation +grandmother +heart +perspective +photo +recipe +studio +topic +collection +depression +imagination +passion +percentage +resource +setting +ad +agency +college +connection +criticism +debt +description +memory +patience +secretary +solution +administration +aspect +attitude +director +personality +psychology +recommendation +response +selection +storage +version +alcohol +argument +complaint +contract +emphasis +highway +loss +membership +possession +preparation +steak +union +agreement +cancer +currency +employment +engineering +entry +interaction +mixture +preference +region +republic +tradition +virus +actor +classroom +delivery +device +difficulty +drama +election +engine +football +guidance +hotel +owner +priority +protection +suggestion +tension +variation +anxiety +atmosphere +awareness +bath +bread +candidate +climate +comparison +confusion +construction +elevator +emotion +employee +employer +guest +height +leadership +mall +manager +operation +recording +sample +transportation +charity +cousin +disaster +editor +efficiency +excitement +extent +feedback +guitar +homework +leader +mom +outcome +permission +presentation +promotion +reflection +refrigerator +resolution +revenue +session +singer +tennis +basket +bonus +cabinet +childhood +church +clothes +coffee +dinner +drawing +hair +hearing +initiative +judgment +lab +measurement +mode +mud +orange +poetry +police +possibility +procedure +queen +ratio +relation +restaurant +satisfaction +sector +signature +significance +song +tooth +town +vehicle +volume +wife +accident +airport +appointment +arrival +assumption +baseball +chapter +committee +conversation +database +enthusiasm +error +explanation +farmer +gate +girl +hall +historian +hospital +injury +instruction +maintenance +manufacturer +meal +perception +pie +poem +presence +proposal +reception +replacement +revolution +river +son +speech +tea +village +warning +winner +worker +writer +assistance +breath +buyer +chest +chocolate +conclusion +contribution +cookie +courage +dad +desk +drawer +establishment +examination +garbage +grocery +honey +impression +improvement +independence +insect +inspection +inspector +king +ladder +menu +penalty +piano +potato +profession +professor +quantity +reaction +requirement +salad +sister +supermarket +tongue +weakness +wedding +affair +ambition +analyst +apple +assignment +assistant +bathroom +bedroom +beer +birthday +celebration +championship +cheek +client +consequence +departure +diamond +dirt +ear +fortune +friendship +funeral +gene +girlfriend +hat +indication +intention +lady +midnight +negotiation +obligation +passenger +pizza +platform +poet +pollution +recognition +reputation +shirt +sir +speaker +stranger +surgery +sympathy +tale +throat +trainer +uncle +youth +time +work +film +water +money +example +while +business +study +game +life +form +air +day +place +number +part +field +fish +back +process +heat +hand +experience +job +book +end +point +type +home +economy +value +body +market +guide +interest +state +radio +course +company +price +size +card +list +mind +trade +line +care +group +risk +word +fat +force +key +light +training +name +school +top +amount +level +order +practice +research +sense +service +piece +web +boss +sport +fun +house +page +term +test +answer +sound +focus +matter +kind +soil +board +oil +picture +access +garden +range +rate +reason +future +site +demand +exercise +image +case +cause +coast +action +age +bad +boat +record +result +section +building +mouse +cash +class +nothing +period +plan +store +tax +side +subject +space +rule +stock +weather +chance +figure +man +model +source +beginning +earth +program +chicken +design +feature +head +material +purpose +question +rock +salt +act +birth +car +dog +object +scale +sun +note +profit +rent +speed +style +war +bank +craft +half +inside +outside +standard +bus +exchange +eye +fire +position +pressure +stress +advantage +benefit +box +frame +issue +step +cycle +face +item +metal +paint +review +room +screen +structure +view +account +ball +discipline +medium +share +balance +bit +black +bottom +choice +gift +impact +machine +shape +tool +wind +address +average +career +culture +morning +pot +sign +table +task +condition +contact +credit +egg +hope +ice +network +north +square +attempt +date +effect +link +post +star +voice +capital +challenge +friend +self +shot +brush +couple +debate +exit +front +function +lack +living +plant +plastic +spot +summer +taste +theme +track +wing +brain +button +click +desire +foot +gas +influence +notice +rain +wall +base +damage +distance +feeling +pair +savings +staff +sugar +target +text +animal +author +budget +discount +file +ground +lesson +minute +officer +phase +reference +register +sky +stage +stick +title +trouble +bowl +bridge +campaign +character +club +edge +evidence +fan +letter +lock +maximum +novel +option +pack +park +plenty +quarter +skin +sort +weight +baby +background +carry +dish +factor +fruit +glass +joint +master +muscle +red +strength +traffic +trip +vegetable +appeal +chart +gear +ideal +kitchen +land +log +mother +net +party +principle +relative +sale +season +signal +spirit +street +tree +wave +belt +bench +commission +copy +drop +minimum +path +progress +project +sea +south +status +stuff +ticket +tour +angle +blue +breakfast +confidence +daughter +degree +doctor +dot +dream +duty +essay +father +fee +finance +hour +juice +limit +luck +milk +mouth +peace +pipe +seat +stable +storm +substance +team +trick +afternoon +bat +beach +blank +catch +chain +consideration +cream +crew +detail +gold +interview +kid +mark +match +mission +pain +pleasure +score +screw +sex +shop +shower +suit +tone +window +agent +band +block +bone +calendar +cap +coat +contest +corner +court +cup +district +door +east +finger +garage +guarantee +hole +hook +implement +layer +lecture +lie +manner +meeting +nose +parking +partner +profile +respect +rice +routine +schedule +swimming +telephone +tip +winter +airline +bag +battle +bed +bill +bother +cake +code +curve +designer +dimension +dress +ease +emergency +evening +extension +farm +fight +gap +grade +holiday +horror +horse +host +husband +loan +mistake +mountain +nail +noise +occasion +package +patient +pause +phrase +proof +race +relief +sand +sentence +shoulder +smoke +stomach +string +tourist +towel +vacation +west +wheel +wine +arm +aside +associate +bet +blow +border +branch +breast +brother +buddy +bunch +chip +coach +cross +document +draft +dust +expert +floor +god +golf +habit +iron +judge +knife +landscape +league +mail +mess +native +opening +parent +pattern +pin +pool +pound +request +salary +shame +shelter +shoe +silver +tackle +tank +trust +assist +bake +bar +bell +bike +blame +boy +brick +chair +closet +clue +collar +comment +conference +devil +diet +fear +fuel +glove +jacket +lunch +monitor +mortgage +nurse +pace +panic +peak +plane +reward +row +sandwich +shock +spite +spray +surprise +till +transition +weekend +welcome +yard +alarm +bend +bicycle +bite +blind +bottle +cable +candle +clerk +cloud +concert +counter +flower +grandfather +harm +knee +lawyer +leather +load +mirror +neck +pension +plate +purple +ruin +ship +skirt +slice +snow +specialist +stroke +switch +trash +tune +zone +anger +award +bid +bitter +boot +bug +camp +candy +carpet +cat +champion +channel +clock +comfort +cow +crack +engineer +entrance +fault +grass +guy +hell +highlight +incident +island +joke +jury +leg +lip +mate +motor +nerve +passage +pen +pride +priest +prize +promise +resident +resort +ring +roof +rope +sail +scheme +script +sock +station +toe +tower +truck +witness +a +you +it +can +will +if +one +many +most +other +use +make +good +look +help +go +great +being +few +might +still +public +read +keep +start +give +human +local +general +she +specific +long +play +feel +high +tonight +put +common +set +change +simple +past +big +possible +particular +today +major +personal +current +national +cut +natural +physical +show +try +check +second +call +move +pay +let +increase +single +individual +turn +ask +buy +guard +hold +main +offer +potential +professional +international +travel +cook +alternative +following +special +working +whole +dance +excuse +cold +commercial +low +purchase +deal +primary +worth +fall +necessary +positive +produce +search +present +spend +talk +creative +tell +cost +drive +green +support +glad +remove +return +run +complex +due +effective +middle +regular +reserve +independent +leave +original +reach +rest +serve +watch +beautiful +charge +active +break +negative +safe +stay +visit +visual +affect +cover +report +rise +walk +white +beyond +junior +pick +unique +anything +classic +final +lift +mix +private +stop +teach +western +concern +familiar +fly +official +broad +comfortable +gain +maybe +rich +save +stand +young +fail +heavy +hello +lead +listen +valuable +worry +handle +leading +meet +release +sell +finish +normal +press +ride +secret +spread +spring +tough +wait +brown +deep +display +flow +hit +objective +shoot +touch +cancel +chemical +cry +dump +extreme +push +conflict +eat +fill +formal +jump +kick +opposite +pass +pitch +remote +total +treat +vast +abuse +beat +burn +deposit +print +raise +sleep +somewhere +advance +anywhere +consist +dark +double +draw +equal +fix +hire +internal +join +kill +sensitive +tap +win +attack +claim +constant +drag +drink +guess +minor +pull +raw +soft +solid +wear +weird +wonder +annual +count +dead +doubt +feed +forever +impress +nobody +repeat +round +sing +slide +strip +whereas +wish +combine +command +dig +divide +equivalent +hang +hunt +initial +march +mention +smell +spiritual +survey +tie +adult +brief +crazy +escape +gather +hate +prior +repair +rough +sad +scratch +sick +strike +employ +external +hurt +illegal +laugh +lay +mobile +nasty +ordinary +respond +royal +senior +split +strain +struggle +swim +train +upper +wash +yellow +convert +crash +dependent +fold +funny +grab +hide +miss +permit +quote +recover +resolve +roll +sink +slip +spare +suspect +sweet +swing +twist +upstairs +usual +abroad +brave +calm +concentrate +estimate +grand +male +mine +prompt +quiet +refuse +regret +reveal +rush +shake +shift +shine +steal +suck +surround +anybody +bear +brilliant +dare +dear +delay +drunk +female +hurry +inevitable +invite +kiss +neat +pop +punch +quit +reply +representative +resist +rip +rub +silly +smile +spell +stretch +stupid +tear +temporary +tomorrow +wake +wrap +yesterday diff --git a/Python Games/hangman/sentences.txt b/Python Games/hangman/sentences.txt new file mode 100644 index 0000000..ecb97bb --- /dev/null +++ b/Python Games/hangman/sentences.txt @@ -0,0 +1,150 @@ +If you like tuna and tomato sauce, try combining the two, it’s really not as bad as it sounds. +She wrote him a long letter, but he didn't read it. +She had the gift of being able to paint songs. +She let the balloon float up into the air with her hopes and dreams. +She folded her handkerchief neatly. +Gary didn't understand why Doug went upstairs to get one dollar bills when he invited him to go cow tipping. +Mary plays the piano. +I was fishing for compliments and accidentally caught a trout. +She lived on Monkey Jungle Road and that seemed to explain all of her strangeness. +Now I need to ponder my existence and ask myself if I'm truly real +He learned the important lesson that a picnic at the beach on a windy day is a bad idea. +Excitement replaced fear until the final moment. +When I was little I had a car door slammed shut on my hand and I still remember it quite vividly. +He decided to count all the sand on the beach as a hobby. +Nancy was proud that she ran a tight shipwreck. +Before he moved to the inner city, he had always believed that security complexes were psychological. +The river stole the gods. +He stepped gingerly onto the bridge knowing that enchantment awaited on the other side. +He decided water-skiing on a frozen lake wasn’t a good idea. +He is no James Bond; his name is Roger Moore. +Martha came to the conclusion that shake weights are a great gift for any occasion. +The tart lemonade quenched her thirst, but not her longing. +Don't step on the broken glass. +He drank life before spitting it out. +On a scale from one to ten, what's your favorite flavor of random grammar? +Garlic ice-cream was her favorite. +I caught my squirrel rustling through my gym bag. +He liked to play with words in the bathtub. +She saw the brake lights, but not in time. +Jerry liked to look at paintings while eating garlic ice cream. +The old apple revels in its authority. +As he looked out the window, he saw a clown walk by. +Peanut butter and jelly caused the elderly lady to think about her past. +Potato wedges probably are not best for relationships. +The father handed each child a roadmap at the beginning of the 2-day road trip and explained it was so they could find their way home. +Smoky the Bear secretly started the fires. +The thunderous roar of the jet overhead confirmed her worst fears. +She was the type of girl that always burnt sugar to show she cared. +I often see the time 11:11 or 12:34 on clocks. +The dead trees waited to be ignited by the smallest spark and seek their revenge. +His thought process was on so many levels that he gave himself a phobia of heights. +The toddler’s endless tantrum caused the entire plane anxiety. +There's an art to getting your way, and spitting olive pits across the table isn't it. +She always speaks to him in a loud voice. +She was only made the society president because she can whistle with her toes. +He ran out of money, so he had to stop playing poker. +Stop waiting for exceptional things to just happen. +The door slammed on the watermelon. +I've never seen a more beautiful brandy glass filled with wine. +She discovered van life is difficult with two cats and a dog. +The gloves protect my feet from excess work. +Despite multiple complications and her near-death experience +Bill ran from the giraffe toward the dolphin. +He had decided to accept his fate of accepting his fate. +The memory we used to share is no longer coherent. +He looked behind the door and didn't like what he saw. +If my calculator had a history, it would be more embarrassing than my browser history. +The body piercing didn't go exactly as he expected. +The stranger officiates the meal. +There's a message for you if you look up. +She found it strange that people use their cellphones to actually talk to one another. +He is no James Bond; his name is Roger Moore. +He uses onomatopoeia as a weapon of mental destruction. +I want a giraffe, but I'm a turtle eating waffles. +The miniature pet elephant became the envy of the neighborhood. +Just because the water is red doesn't mean you can't drink it. +I was offended by the suggestion that my baby brother was a jewel thief. +Peanuts don't grow on trees, but cashews do. +I've always wanted to go to Tajikistan, but my cat would miss me. +The Tsunami wave crashed against the raised houses and broke the pilings as if they were toothpicks. +I love eating toasted cheese and tuna sandwiches. +The ants enjoyed the barbecue more than the family. +The water flowing down the river didn’t look that powerful from the car +My dentist tells me that chewing bricks is very bad for your teeth. +The small white buoys marked the location of hundreds of crab pots. +It took him a while to realize that everything he decided not to change, he was actually choosing. +I know many children ask for a pony, but I wanted a bicycle with rockets strapped to it. +He didn't heed the warning and it had turned out surprisingly well. +As time wore on, simple dog commands turned into full paragraphs explaining why the dog couldn’t do something. +She borrowed the book from him many years ago and hasn't yet returned it. +The thick foliage and intertwined vines made the hike nearly impossible. +He had a wall full of masks so she could wear a different face every day. +He went back to the video to see what had been recorded and was shocked at what he saw. +She wondered what his eyes were saying beneath his mirrored sunglasses. +For the 216th time, he said he would quit drinking soda after this last Coke. +Improve your goldfish's physical fitness by getting him a bicycle. +Everybody should read Chaucer to improve their everyday vocabulary. +Courage and stupidity were all he had. +The stench from the feedlot permeated the car despite having the air conditioning on recycled air. +He kept telling himself that one day it would all somehow make sense. +We have a lot of rain in June. +As he waited for the shower to warm, he noticed that he could hear water change temperature. +His ultimate dream fantasy consisted of being content and sleeping eight hours in a row. +After coating myself in vegetable oil I found my success rate skyrocketed. +The swirled lollipop had issues with the pop rock candy. +As he dangled from the rope deep inside the crevasse +Today we gathered moss for my uncle's wedding. +Random words in front of other random words create a random sentence. +She was too busy always talking about what she wanted to do to actually do any of it. +The blue parrot drove by the hitchhiking mongoose. +Greetings from the real universe. +He was the only member of the club who didn't like plum pudding. +Never underestimate the willingness of the greedy to throw you under the bus. +To the surprise of everyone, the Rapture happened yesterday but it didn't quite go as expected. +He felt that dining on the bridge brought romance to his relationship with his cat. +Truth in advertising and dinosaurs with skateboards have much in common. +Mr. Montoya knows the way to the bakery even though he's never been there. +I ate a sock because people on the Internet told me to. +She had convinced her kids that any mushroom found on the ground would kill them if they touched it. +When confronted with a rotary dial phone the teenager was perplexed. +The urgent care center was flooded with patients after the news of a new deadly virus was made public. +Jerry liked to look at paintings while eating garlic ice cream. +I may struggle with geography, but I'm sure I'm somewhere around here. +He had concluded that pigs must be able to fly in Hog Heaven. +Strawberries must be the one food that doesn't go well with this brand of paint. +Jeanne wished she has chosen the red button. +He played the game as if his life depended on it and the truth was that it did. +The elderly neighborhood became enraged over the coyotes who had been blamed for the poodle’s disappearance. +The family’s excitement over going to Disneyland was crazier than she anticipated. +I’m working on a sweet potato farm. +Every manager should be able to recite at least ten nursery rhymes backward. +There's no reason a hula hoop can't also be a circus ring. +She was too short to see over the fence. +Buried deep in the snow, he hoped his batteries were fresh in his avalanche beacon. +Improve your goldfish's physical fitness by getting him a bicycle. +The waves were crashing on the shore; it was a lovely sight. +Sometimes it is better to just walk away from things and go back to them later when you’re in a better frame of mind. +She was only made the society president because she can whistle with her toes. +Flash photography is best used in full sunlight. +There are no heroes in a punk rock band. +The small white buoys marked the location of hundreds of crab pots. +We have a lot of rain in June. +He said he was not there yesterday; however, many people saw him there. +I made myself a peanut butter sandwich as I didn't want to subsist on veggie crackers. +They ran around the corner to find that they had traveled back in time. +The efficiency we have at removing trash has made creating trash more acceptable. +I purchased a baby clown from the Russian terrorist black market. +The clouds formed beautiful animals in the sky that eventually created a tornado to wreak havoc. +Going from child, to childish, to childlike is only a matter of time. +The old rusted farm equipment surrounded the house predicting its demise. +There was no telling what thoughts would come from the machine. +If my calculator had a history, it would be more embarrassing than my browser history. +Sometimes, all you need to do is completely make an ass of yourself and laugh it off to realise that life isn’t so bad after all. +Jim liked driving around town with his hazard lights on. +The newly planted trees were held up by wooden frames in hopes they could survive the next storm. +That is an appealing treasure map that I can't read. +If any cop asks you where you were, just say you were visiting Kansas. +The hawk didn’t understand why the ground squirrels didn’t want to be his friend. +I had a friend in high school named Rick Shaw, but he was fairly useless as a mode of transport. +It turns out you don't need all that stuff you insisted you did.