Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION IS IN PYTHON PLEASE ANSWER IN PYTHON Question 8 : 4 points Examine the following program. It includes a function that takes a list
QUESTION IS IN PYTHON PLEASE ANSWER IN PYTHON
Question 8 : 4 points Examine the following program. It includes a function that takes a list as an argument. Enter and execute the code 1 import randor 3 def orderList (newList): newList. sort () newList. reverse () return newList 4 7 8 myList = [] 9for y in range (0,100): 10 11 print (orderList (myList)) myList.append (random. randint (1,100 (a) (2 points) What is the name of the function defined in this program? (b) (2 points) What does the function do? Question 9: 4 points Enter and execute the following code. 1 userInput - input("Enter a string that contains only letters: ") 2 if userInput.isalpha (): 3 4 else: print("Your string is valid.") print("Your string does not contain all letters.") (a) (2 points) Execute the program with different inputs and examine the output. Determine what the program does experimentally. Describe what this program does (b) (2 points) What does the isalpha() function doStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started