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

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 nums . You do not need to read in any input and can use nums 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 abs_more_than_10 against the expected sample output.

Hint: We have written the first line, initializing abs_more_than_10 as False. You should update this variable in the loop body.

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899