Sep-11-2020, 08:00 PM
Hi! I am new to python (and coding in general) and for one of my first projects I am making a hangman program. but i can't seem to get my syntax to work. I don't know if this matters but I am using repl.it python engine. Any form of help would be greatly appreciated! Here is my code
1 2 3 4 |
life = len (HANGMAN) - 1 words = [ "hangman" , "backpack" , "bodywash" , "clothing" , "computer" , "python" , "program" , "glasses" , "sweatshirt" , "sweatpants" , "mattress" , "friends" , "clocks" , "biology" , "algebra" , "suitcase" , "knives" , "ninjas" , "shampoo" , "chemistry" , "sololearn" , "bottle" , "physics" , "flowers’,‘touch’," machine "," delirious "," rambunctious "," fixed "," scab "," girls "," humdrum "," lizards "," spoon "," rush "," testy "," homeless "," clammy "," pest "," purring "," leave "," gun "," lose "," fall "," bumpy "," aberrant "," squealing "," story "," cut "," classy "," colorful "," slip "," crooked "," dazzling "," make "," helpful "," envious "," afterthought "," indulge "," wacky "," compete "," mixed "," monkey "," rainstorm "," hysterical "," effect "," rude "," slip "," aloo f "," Earthquake ", " curious"] word = words[random.randint( 0 , len (words) - 1 )] guess = list ( len (word) * '*' ) |