Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 do

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

What is the purpose of the IEEE 802 committee?

Answered: 1 week ago

Question

Question 1 (a2) What is the reaction force Dx in [N]?

Answered: 1 week ago