Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

12. Create a while loop to print the numbers from 1 to 100 but stop the loop early if the number is divisible by 5

image text in transcribed

12. Create a while loop to print the numbers from 1 to 100 but stop the loop early if the number is divisible by 5 and 7 using break. Your while loop condition must be set to stop at 100 and must contain an if statement that includes a test involving % 5 and \% 7. 13. Use print() to print each loop output on new line. Refer below an example of running your program. The lines in bold show where random numbers will show up, so your results should be different. 14. Run your program. Make sure it runs. Take screenshot of program output showing

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_2

Step: 3

blur-text-image_3

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

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students explore these related Databases questions