Question: Write Code Questions 20. Write code that reads in 3 words one at a time, then creates a list containing all 3 words. 21.

Write Code Questions 20. Write code that reads in 3 words one

at a time, then creates a list containing all 3 words. 21.


Write Code Questions 20. Write code that reads in 3 words one at a time, then creates a list containing all 3 words. 21. Write a program that reads in an integer from the user and then outputs whether that value is odd or even. 22. Rewrite the following code fragment without a nested if-else statement. The new code should not have a nested if statement, but should only include one if-else statement using logical and relational operators. Your new code should be shorter, clearer, and easier to read but functionally perform the same as the original code. 1a #some value 2 b #some value 3 4 if a 0: print ("Error, both a and b must be non-negative") 6 else: 34567890 10 if b < 0: print ("Error, both a and b must be non-negative") else: print("Please proceed.") 23. Write a program that takes 3 floating point values from the user and creates a list. After the list creation, this program should then ask the user whether they wish to add or delete a value. Based on the response from the user, implement the appropriate code to add or delete a specific value provided by the user. Finally before the program terminates, output the list to the user. 24. Write a program that takes 3 floating point values from the user. Without creating a list or otherwise grouped data type, output the 3 values in descending order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Code for Question 20 python words for i in range3 word inputEnter a word wordsappendword printList o... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!