You have been asked to write a loop that outputs values in a database column ranging between 10 and 100. Any number that is not divisible by 5, and any value that is not an integer, should be ignored. When the value in the loop hits 95, break the loop prematurely. One of your team members has advised the use of break, continue, and pass statements. Define a for loop, using the range function to create the lower (10) and upper (100) limits. Define a condition that checks for zero. Define a condition that checks whether the number is divisible by 5. Define a condition that checks the data type. Define a condition that checks for 95, and breaks the loop. Define a condition that uses the pass statement if the number doesn't meet any condition. Print the number if it meets the condition. 10 15 20 25

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 4.4CP
icon
Related questions
Question

You have been asked to write a loop that outputs values in a database column ranging between 10 and 100. Any number that is not divisible by 5, and any value that is not an integer, should be ignored. When the value in the loop hits 95, break the loop prematurely. One of your team members has advised the use of break, continue, and pass statements.

  1. Define a for loop, using the range function to create the lower (10) and upper (100) limits.

  2. Define a condition that checks for zero.

  3. Define a condition that checks whether the number is divisible by 5.

  4. Define a condition that checks the data type.

  5. Define a condition that checks for 95, and breaks the loop.

  6. Define a condition that uses the pass statement if the number doesn't meet any condition.

  7. Print the number if it meets the condition.

10
15
20
25
30
35
...
...
80
85
90

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Intermediate SQL concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning