PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON Take…

Question Answered step-by-step PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON Take… PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHON PYTHONTake the program you designed for Flow Control Lab Part 1 and modify it to allow the program to keep running until a condition is met, and add a for loop that executes a random number of times.The program must:build off of your program designed in Lab 2 Part 1, making changes as you need toinclude one while loop that ends the program based on user’s input, otherwise the program will keep asking the questions over and over againinclude one for loop that will iterate a random number of times, displaying something to the user that same number of timesNote: Input validation is not required, so assume the user will enter answers that make sense for the questions you ask. However, make sure your program does something when receiving unexpected input.Here is the code that is needed for the question!print(‘Hello, what is your name:’)name = input()print(‘Hello, ‘ + name + ‘ ‘)print(‘Which sport do you like more, soccer or basketball? ‘)sport = input()print(‘Which player is your favorite in the sport you choose? ” :’)player = input()if sport == “soccer”: if player == “Zidane”: print(“That’s unfortunate since he’s not playing at tonight’s match”) elif player == “Ronaldo”: print(“Hey he’s playing at tonight’s match, what a coincidence!.”) else: print(“Ah man you dont have a favorite soccer player?”)elif sport == “basketball”: if player == “Lebron”: print(“Hey good choice, he’s one of the best players the sport has seen.”) elif player == “Kobe”: print(“That’s actually my favorite player as well what a surprise!”) else: print(“Ah man you dont have a favorite basketball player?”) Computer Science Engineering & Technology Python Programming Share QuestionEmailCopy link Comments (0)