Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a while loop that iterates through a list, nums, and determines whether or not it contains a value whose absolute value is greater than

image text in transcribed
Write a while loop that iterates through a list, nums, and determines whether or not it contains a value whose absolute value is greater than 10. Use the boolean variable abs_more_than_10 to store whether or not the list contains a value whose absolute value is greater than 10. The list of numbers used for each test is shown in the sample input. These numbers have already been read in and stored into the list nuns . You do not need to read in any input and can use from the beginning of your program. You do not need to print anything at the end of your program. At the end of your program, the tests will check the value of against the expected sample output. Hint: We have written the first line, initializing as False. You should update this variable in the loop body. Sample input 1: 8=4712 Sample Output 1: True Sample input 2: 1734 Sample Output 2: True Sample Input 3: 130 Sample Output 3: True

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

More Books

Students also viewed these Databases questions