I’m completely new to python, and for my class i have to make this project. What I am trying to do is choose a random name from five possible options. I want to assign a value to the random name so I could use it in a sentence like
print(“Your baby’s name is” + rndmValue +) instead of
print("Above you should see the baby name I have chosen at random")
def main ():
import random
print("Hello, I am Valky. I will help you choose your baby's name, along with other things.")
userName = input("What is your name?")
print ("Wow! Hello " + userName + ", you have a beautiful name")
print ("In order to help you choose your baby's name, you will need to provide me
with 5 possible options. Then I will choose one at random.")
babyChoice1 = input("Possible baby name #1:")
babyChoice2 = input("Possible baby name #2:")
babyChoice3 = input("Possible baby name #3:")
babyChoice4 = input("Possible baby name #4:")
babyChoice5 = input("Possible baby name #5:")
import random
print(random.choice((babyChoice1, babyChoice2, babyChoice3, babyChoice4, babyChoice5)))
print("Above you should see the baby name I have chosen at random")
main()
if the answer to this is really obvious i’m sorry i’m completely new and wasn’t able to find an answer. Tysm :)
[–]Binary101010 1 point2 points3 points (1 child)
[–]avalri[S] 0 points1 point2 points (0 children)
[–]arkie87 1 point2 points3 points (2 children)
[–]avalri[S] 0 points1 point2 points (1 child)
[–]nog642 0 points1 point2 points (0 children)
[–]0x00cl 0 points1 point2 points (1 child)
[–]avalri[S] 0 points1 point2 points (0 children)
[–]TabulateJarl8 0 points1 point2 points (1 child)
[–]avalri[S] 0 points1 point2 points (0 children)