Sentence generator works, but wonky. Trouble debugging [on hold]

Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
(Full code below with asterisks in place of a curse word as not sure how those are viewed on a site like this, rather be safe than sorry.)
To keep my interests while trying to learn Python, I often think up programs that, at their most basic level, should be simple enough for me to accomplish with my current knowledge base. Today I had the idea to make a random sentence generator. I understand to make PROPER sentences would be beyond me, but I should be able to pull words from lists of nouns, adjectives, etc that I've predefined (expecting it to read like a bad video game translation, but figured that would be hilarious and DEFINITELY worth my time lol) and give a general order of sentence structure using functions that look what list the word came from and then deciding logically what list the next word should come from.
That all being said, my main issue seems to stem from something with my next_word() function. I have been toying around with it in a few different ways and finally got it to "work" BUUUUT for some reason it randomly prints individual characters sometimes mid sentence. Example of some of the output I've gotten:
red pelvis l ***** b slowly n quietly a dull s Sonic t sharp o
Would you like to make another sentence?
>y
guitar slowly o skinny e spoons l smart p spicy u cold a quickly e brain u guitar s quietly l fat e shoebox u
Would you like to make another sentence?
I also realize that there may be a chance (probably a high one) that it is not properly following my sentence structure due to me not using enough variables/not implementing them properly (you'll see I commented out a #current_word = next_word so am working on that part. But, I once got "Sonic c Sonic" and I should not be able to get back to back nouns, unless the 'c' is from a valid word and is just being cut off for some reason.). Could this possibly be the cause of those stray characters printing?
Code below here:
#This program will attempt to create random sentences using a basic sentence structure and "randomness". Hopefully, hilarity ensues.
#Best I've seen so far is "Red pelvis fucks slowly" XD
import time
import random
PROGRAM_END = False
screen_width = 100
#List of possible adjectives program can choose
available_adjectives = (
'blue', 'green', 'red', 'gold', 'yellow', 'orange', 'old', 'new', 'slow', 'fast', 'hot', 'cold', 'quick', 'glowing', 'dull', 'sharp',
'spicy', 'plain', 'regular', 'heavy', 'fat', 'thin', 'skinny', 'smart', 'dumb', 'talented', 'destroyed', 'light', 'dark', 'clear', 'obscure',
'10,000', '300', 'rusty', 'over-sized', 'dirty', 'droopy', 'limp', 'strong'
)
#List of possible adverbs program can choose
available_adverbs = (
'quickly', 'swiftly', 'rapidly', 'slowly', 'precisely', 'carelessly', 'loudly', 'quietly', 'vigorously'
)
#List of possible nouns program can choose
available_nouns = (
'car', 'your mom', 'aliens', 'Harry Potter', 'Mario', 'Sonic', 'desert', 'Pacific Ocean', 'butterfly', 'eyes', 'dog', 'coffin',
'vampire', 'Leonardo DiCaprio', 'Santa', 'Kramer', 'table', 'house', 'Florida', 'this guy', 'thumbs', 'toenails', 'spoons', 'kettle',
'guitar', 'voice', 'shoebox', 'heart', 'brain', 'knee', 'pelvis', 'you', 'esophagus', 'diarrhea'
)
#List of possible verbs program can choose
available_verbs = (
'blinks', 'eye-bang', 'shakes', '*****', 'plays', 'learned', 'be', 'flies', 'run', 'sleeps', 'listens', 'feels', 'hear', 'tells', 'changes'
)
all_words = available_nouns + available_verbs + available_adverbs + available_adjectives
random_noun = random.choice(available_nouns)
random_verb = random.choice(available_verbs)
random_adverb = random.choice(available_adverbs)
random_adjective = random.choice(available_adjectives)
#Tells program to pick the first word of the sentence
def first_word_choice():
first_word = random.choice(all_words)
print(first_word, end = " ")
return first_word
#Defines loop for searching the lists and attempts to follow proper grammar rules as far as sentence structure
#Maybe in the future I can come up with a way of choosing proper verb tense, etc
def next_word():
first_word = first_word_choice()
next_word = ""
if first_word in available_adjectives:
next_word = random.choice(random_adjective + random_noun)
print("" + next_word + "", end = " ")
elif first_word in available_adverbs:
next_word = random.choice(random_noun + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_nouns:
next_word = random.choice(random_adverb + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_verbs:
next_word = random.choice(random_noun + random_adjective)
print("" + next_word + "", end = " ")
current_word = next_word
#Main loop
while PROGRAM_END == False:
sentence_length = random.randint(3,16)
print("n")
first_word_choice()
sentence_length -= 1
while sentence_length > 0:
next_word()
sentence_length -= 1
print("n")
#Checks to see if you would like another sentence generated
print("Would you like to make another sentence? n")
player_choice = input("> ")
#Loops program back to start to generate another sentence
if player_choice in ['yes', 'y', 'please', 'sure', 'hell yes', 'yeah', 'yea', 'ye', 'why not', 'shitchya']:
PROGRAM_END = False
#Exits program and thanks user for trying it out.
else:
print("Thanks for checking it out. Hope you got some laughs")
PROGRAM_END = True
python beginner
put on hold as off-topic by Graipher, Ludisposed, Mast, Peilonrayz, Vogel612⦠Aug 3 at 9:36
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." â Graipher, Ludisposed, Mast, Peilonrayz, Vogel612
add a comment |Â
up vote
0
down vote
favorite
(Full code below with asterisks in place of a curse word as not sure how those are viewed on a site like this, rather be safe than sorry.)
To keep my interests while trying to learn Python, I often think up programs that, at their most basic level, should be simple enough for me to accomplish with my current knowledge base. Today I had the idea to make a random sentence generator. I understand to make PROPER sentences would be beyond me, but I should be able to pull words from lists of nouns, adjectives, etc that I've predefined (expecting it to read like a bad video game translation, but figured that would be hilarious and DEFINITELY worth my time lol) and give a general order of sentence structure using functions that look what list the word came from and then deciding logically what list the next word should come from.
That all being said, my main issue seems to stem from something with my next_word() function. I have been toying around with it in a few different ways and finally got it to "work" BUUUUT for some reason it randomly prints individual characters sometimes mid sentence. Example of some of the output I've gotten:
red pelvis l ***** b slowly n quietly a dull s Sonic t sharp o
Would you like to make another sentence?
>y
guitar slowly o skinny e spoons l smart p spicy u cold a quickly e brain u guitar s quietly l fat e shoebox u
Would you like to make another sentence?
I also realize that there may be a chance (probably a high one) that it is not properly following my sentence structure due to me not using enough variables/not implementing them properly (you'll see I commented out a #current_word = next_word so am working on that part. But, I once got "Sonic c Sonic" and I should not be able to get back to back nouns, unless the 'c' is from a valid word and is just being cut off for some reason.). Could this possibly be the cause of those stray characters printing?
Code below here:
#This program will attempt to create random sentences using a basic sentence structure and "randomness". Hopefully, hilarity ensues.
#Best I've seen so far is "Red pelvis fucks slowly" XD
import time
import random
PROGRAM_END = False
screen_width = 100
#List of possible adjectives program can choose
available_adjectives = (
'blue', 'green', 'red', 'gold', 'yellow', 'orange', 'old', 'new', 'slow', 'fast', 'hot', 'cold', 'quick', 'glowing', 'dull', 'sharp',
'spicy', 'plain', 'regular', 'heavy', 'fat', 'thin', 'skinny', 'smart', 'dumb', 'talented', 'destroyed', 'light', 'dark', 'clear', 'obscure',
'10,000', '300', 'rusty', 'over-sized', 'dirty', 'droopy', 'limp', 'strong'
)
#List of possible adverbs program can choose
available_adverbs = (
'quickly', 'swiftly', 'rapidly', 'slowly', 'precisely', 'carelessly', 'loudly', 'quietly', 'vigorously'
)
#List of possible nouns program can choose
available_nouns = (
'car', 'your mom', 'aliens', 'Harry Potter', 'Mario', 'Sonic', 'desert', 'Pacific Ocean', 'butterfly', 'eyes', 'dog', 'coffin',
'vampire', 'Leonardo DiCaprio', 'Santa', 'Kramer', 'table', 'house', 'Florida', 'this guy', 'thumbs', 'toenails', 'spoons', 'kettle',
'guitar', 'voice', 'shoebox', 'heart', 'brain', 'knee', 'pelvis', 'you', 'esophagus', 'diarrhea'
)
#List of possible verbs program can choose
available_verbs = (
'blinks', 'eye-bang', 'shakes', '*****', 'plays', 'learned', 'be', 'flies', 'run', 'sleeps', 'listens', 'feels', 'hear', 'tells', 'changes'
)
all_words = available_nouns + available_verbs + available_adverbs + available_adjectives
random_noun = random.choice(available_nouns)
random_verb = random.choice(available_verbs)
random_adverb = random.choice(available_adverbs)
random_adjective = random.choice(available_adjectives)
#Tells program to pick the first word of the sentence
def first_word_choice():
first_word = random.choice(all_words)
print(first_word, end = " ")
return first_word
#Defines loop for searching the lists and attempts to follow proper grammar rules as far as sentence structure
#Maybe in the future I can come up with a way of choosing proper verb tense, etc
def next_word():
first_word = first_word_choice()
next_word = ""
if first_word in available_adjectives:
next_word = random.choice(random_adjective + random_noun)
print("" + next_word + "", end = " ")
elif first_word in available_adverbs:
next_word = random.choice(random_noun + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_nouns:
next_word = random.choice(random_adverb + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_verbs:
next_word = random.choice(random_noun + random_adjective)
print("" + next_word + "", end = " ")
current_word = next_word
#Main loop
while PROGRAM_END == False:
sentence_length = random.randint(3,16)
print("n")
first_word_choice()
sentence_length -= 1
while sentence_length > 0:
next_word()
sentence_length -= 1
print("n")
#Checks to see if you would like another sentence generated
print("Would you like to make another sentence? n")
player_choice = input("> ")
#Loops program back to start to generate another sentence
if player_choice in ['yes', 'y', 'please', 'sure', 'hell yes', 'yeah', 'yea', 'ye', 'why not', 'shitchya']:
PROGRAM_END = False
#Exits program and thanks user for trying it out.
else:
print("Thanks for checking it out. Hope you got some laughs")
PROGRAM_END = True
python beginner
put on hold as off-topic by Graipher, Ludisposed, Mast, Peilonrayz, Vogel612⦠Aug 3 at 9:36
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." â Graipher, Ludisposed, Mast, Peilonrayz, Vogel612
3
random.choice(random_noun + random_verb)randomly chooses a letter from a string, sincerandom_nounandrandom_verbare constant strings, which you only define once. You probably wantrandom.choice(available_nouns + available_verbs).
â Graipher
Aug 3 at 9:09
2
Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.
â Mast
Aug 3 at 9:29
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
(Full code below with asterisks in place of a curse word as not sure how those are viewed on a site like this, rather be safe than sorry.)
To keep my interests while trying to learn Python, I often think up programs that, at their most basic level, should be simple enough for me to accomplish with my current knowledge base. Today I had the idea to make a random sentence generator. I understand to make PROPER sentences would be beyond me, but I should be able to pull words from lists of nouns, adjectives, etc that I've predefined (expecting it to read like a bad video game translation, but figured that would be hilarious and DEFINITELY worth my time lol) and give a general order of sentence structure using functions that look what list the word came from and then deciding logically what list the next word should come from.
That all being said, my main issue seems to stem from something with my next_word() function. I have been toying around with it in a few different ways and finally got it to "work" BUUUUT for some reason it randomly prints individual characters sometimes mid sentence. Example of some of the output I've gotten:
red pelvis l ***** b slowly n quietly a dull s Sonic t sharp o
Would you like to make another sentence?
>y
guitar slowly o skinny e spoons l smart p spicy u cold a quickly e brain u guitar s quietly l fat e shoebox u
Would you like to make another sentence?
I also realize that there may be a chance (probably a high one) that it is not properly following my sentence structure due to me not using enough variables/not implementing them properly (you'll see I commented out a #current_word = next_word so am working on that part. But, I once got "Sonic c Sonic" and I should not be able to get back to back nouns, unless the 'c' is from a valid word and is just being cut off for some reason.). Could this possibly be the cause of those stray characters printing?
Code below here:
#This program will attempt to create random sentences using a basic sentence structure and "randomness". Hopefully, hilarity ensues.
#Best I've seen so far is "Red pelvis fucks slowly" XD
import time
import random
PROGRAM_END = False
screen_width = 100
#List of possible adjectives program can choose
available_adjectives = (
'blue', 'green', 'red', 'gold', 'yellow', 'orange', 'old', 'new', 'slow', 'fast', 'hot', 'cold', 'quick', 'glowing', 'dull', 'sharp',
'spicy', 'plain', 'regular', 'heavy', 'fat', 'thin', 'skinny', 'smart', 'dumb', 'talented', 'destroyed', 'light', 'dark', 'clear', 'obscure',
'10,000', '300', 'rusty', 'over-sized', 'dirty', 'droopy', 'limp', 'strong'
)
#List of possible adverbs program can choose
available_adverbs = (
'quickly', 'swiftly', 'rapidly', 'slowly', 'precisely', 'carelessly', 'loudly', 'quietly', 'vigorously'
)
#List of possible nouns program can choose
available_nouns = (
'car', 'your mom', 'aliens', 'Harry Potter', 'Mario', 'Sonic', 'desert', 'Pacific Ocean', 'butterfly', 'eyes', 'dog', 'coffin',
'vampire', 'Leonardo DiCaprio', 'Santa', 'Kramer', 'table', 'house', 'Florida', 'this guy', 'thumbs', 'toenails', 'spoons', 'kettle',
'guitar', 'voice', 'shoebox', 'heart', 'brain', 'knee', 'pelvis', 'you', 'esophagus', 'diarrhea'
)
#List of possible verbs program can choose
available_verbs = (
'blinks', 'eye-bang', 'shakes', '*****', 'plays', 'learned', 'be', 'flies', 'run', 'sleeps', 'listens', 'feels', 'hear', 'tells', 'changes'
)
all_words = available_nouns + available_verbs + available_adverbs + available_adjectives
random_noun = random.choice(available_nouns)
random_verb = random.choice(available_verbs)
random_adverb = random.choice(available_adverbs)
random_adjective = random.choice(available_adjectives)
#Tells program to pick the first word of the sentence
def first_word_choice():
first_word = random.choice(all_words)
print(first_word, end = " ")
return first_word
#Defines loop for searching the lists and attempts to follow proper grammar rules as far as sentence structure
#Maybe in the future I can come up with a way of choosing proper verb tense, etc
def next_word():
first_word = first_word_choice()
next_word = ""
if first_word in available_adjectives:
next_word = random.choice(random_adjective + random_noun)
print("" + next_word + "", end = " ")
elif first_word in available_adverbs:
next_word = random.choice(random_noun + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_nouns:
next_word = random.choice(random_adverb + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_verbs:
next_word = random.choice(random_noun + random_adjective)
print("" + next_word + "", end = " ")
current_word = next_word
#Main loop
while PROGRAM_END == False:
sentence_length = random.randint(3,16)
print("n")
first_word_choice()
sentence_length -= 1
while sentence_length > 0:
next_word()
sentence_length -= 1
print("n")
#Checks to see if you would like another sentence generated
print("Would you like to make another sentence? n")
player_choice = input("> ")
#Loops program back to start to generate another sentence
if player_choice in ['yes', 'y', 'please', 'sure', 'hell yes', 'yeah', 'yea', 'ye', 'why not', 'shitchya']:
PROGRAM_END = False
#Exits program and thanks user for trying it out.
else:
print("Thanks for checking it out. Hope you got some laughs")
PROGRAM_END = True
python beginner
(Full code below with asterisks in place of a curse word as not sure how those are viewed on a site like this, rather be safe than sorry.)
To keep my interests while trying to learn Python, I often think up programs that, at their most basic level, should be simple enough for me to accomplish with my current knowledge base. Today I had the idea to make a random sentence generator. I understand to make PROPER sentences would be beyond me, but I should be able to pull words from lists of nouns, adjectives, etc that I've predefined (expecting it to read like a bad video game translation, but figured that would be hilarious and DEFINITELY worth my time lol) and give a general order of sentence structure using functions that look what list the word came from and then deciding logically what list the next word should come from.
That all being said, my main issue seems to stem from something with my next_word() function. I have been toying around with it in a few different ways and finally got it to "work" BUUUUT for some reason it randomly prints individual characters sometimes mid sentence. Example of some of the output I've gotten:
red pelvis l ***** b slowly n quietly a dull s Sonic t sharp o
Would you like to make another sentence?
>y
guitar slowly o skinny e spoons l smart p spicy u cold a quickly e brain u guitar s quietly l fat e shoebox u
Would you like to make another sentence?
I also realize that there may be a chance (probably a high one) that it is not properly following my sentence structure due to me not using enough variables/not implementing them properly (you'll see I commented out a #current_word = next_word so am working on that part. But, I once got "Sonic c Sonic" and I should not be able to get back to back nouns, unless the 'c' is from a valid word and is just being cut off for some reason.). Could this possibly be the cause of those stray characters printing?
Code below here:
#This program will attempt to create random sentences using a basic sentence structure and "randomness". Hopefully, hilarity ensues.
#Best I've seen so far is "Red pelvis fucks slowly" XD
import time
import random
PROGRAM_END = False
screen_width = 100
#List of possible adjectives program can choose
available_adjectives = (
'blue', 'green', 'red', 'gold', 'yellow', 'orange', 'old', 'new', 'slow', 'fast', 'hot', 'cold', 'quick', 'glowing', 'dull', 'sharp',
'spicy', 'plain', 'regular', 'heavy', 'fat', 'thin', 'skinny', 'smart', 'dumb', 'talented', 'destroyed', 'light', 'dark', 'clear', 'obscure',
'10,000', '300', 'rusty', 'over-sized', 'dirty', 'droopy', 'limp', 'strong'
)
#List of possible adverbs program can choose
available_adverbs = (
'quickly', 'swiftly', 'rapidly', 'slowly', 'precisely', 'carelessly', 'loudly', 'quietly', 'vigorously'
)
#List of possible nouns program can choose
available_nouns = (
'car', 'your mom', 'aliens', 'Harry Potter', 'Mario', 'Sonic', 'desert', 'Pacific Ocean', 'butterfly', 'eyes', 'dog', 'coffin',
'vampire', 'Leonardo DiCaprio', 'Santa', 'Kramer', 'table', 'house', 'Florida', 'this guy', 'thumbs', 'toenails', 'spoons', 'kettle',
'guitar', 'voice', 'shoebox', 'heart', 'brain', 'knee', 'pelvis', 'you', 'esophagus', 'diarrhea'
)
#List of possible verbs program can choose
available_verbs = (
'blinks', 'eye-bang', 'shakes', '*****', 'plays', 'learned', 'be', 'flies', 'run', 'sleeps', 'listens', 'feels', 'hear', 'tells', 'changes'
)
all_words = available_nouns + available_verbs + available_adverbs + available_adjectives
random_noun = random.choice(available_nouns)
random_verb = random.choice(available_verbs)
random_adverb = random.choice(available_adverbs)
random_adjective = random.choice(available_adjectives)
#Tells program to pick the first word of the sentence
def first_word_choice():
first_word = random.choice(all_words)
print(first_word, end = " ")
return first_word
#Defines loop for searching the lists and attempts to follow proper grammar rules as far as sentence structure
#Maybe in the future I can come up with a way of choosing proper verb tense, etc
def next_word():
first_word = first_word_choice()
next_word = ""
if first_word in available_adjectives:
next_word = random.choice(random_adjective + random_noun)
print("" + next_word + "", end = " ")
elif first_word in available_adverbs:
next_word = random.choice(random_noun + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_nouns:
next_word = random.choice(random_adverb + random_verb)
print("" + next_word + "", end = " ")
elif first_word in available_verbs:
next_word = random.choice(random_noun + random_adjective)
print("" + next_word + "", end = " ")
current_word = next_word
#Main loop
while PROGRAM_END == False:
sentence_length = random.randint(3,16)
print("n")
first_word_choice()
sentence_length -= 1
while sentence_length > 0:
next_word()
sentence_length -= 1
print("n")
#Checks to see if you would like another sentence generated
print("Would you like to make another sentence? n")
player_choice = input("> ")
#Loops program back to start to generate another sentence
if player_choice in ['yes', 'y', 'please', 'sure', 'hell yes', 'yeah', 'yea', 'ye', 'why not', 'shitchya']:
PROGRAM_END = False
#Exits program and thanks user for trying it out.
else:
print("Thanks for checking it out. Hope you got some laughs")
PROGRAM_END = True
python beginner
asked Aug 3 at 8:51
Chris
11
11
put on hold as off-topic by Graipher, Ludisposed, Mast, Peilonrayz, Vogel612⦠Aug 3 at 9:36
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." â Graipher, Ludisposed, Mast, Peilonrayz, Vogel612
put on hold as off-topic by Graipher, Ludisposed, Mast, Peilonrayz, Vogel612⦠Aug 3 at 9:36
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." â Graipher, Ludisposed, Mast, Peilonrayz, Vogel612
3
random.choice(random_noun + random_verb)randomly chooses a letter from a string, sincerandom_nounandrandom_verbare constant strings, which you only define once. You probably wantrandom.choice(available_nouns + available_verbs).
â Graipher
Aug 3 at 9:09
2
Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.
â Mast
Aug 3 at 9:29
add a comment |Â
3
random.choice(random_noun + random_verb)randomly chooses a letter from a string, sincerandom_nounandrandom_verbare constant strings, which you only define once. You probably wantrandom.choice(available_nouns + available_verbs).
â Graipher
Aug 3 at 9:09
2
Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.
â Mast
Aug 3 at 9:29
3
3
random.choice(random_noun + random_verb) randomly chooses a letter from a string, since random_noun and random_verb are constant strings, which you only define once. You probably want random.choice(available_nouns + available_verbs).â Graipher
Aug 3 at 9:09
random.choice(random_noun + random_verb) randomly chooses a letter from a string, since random_noun and random_verb are constant strings, which you only define once. You probably want random.choice(available_nouns + available_verbs).â Graipher
Aug 3 at 9:09
2
2
Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.
â Mast
Aug 3 at 9:29
Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.
â Mast
Aug 3 at 9:29
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
3
random.choice(random_noun + random_verb)randomly chooses a letter from a string, sincerandom_nounandrandom_verbare constant strings, which you only define once. You probably wantrandom.choice(available_nouns + available_verbs).â Graipher
Aug 3 at 9:09
2
Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.
â Mast
Aug 3 at 9:29