coding_with_loops_worksheet-1.rtf - Coding with Loops...

This preview shows page 1 - 2 out of 3 pages.

Coding with Loops WorksheetOutput: Your goalYou will complete a program that asks a user to guess anumber.Part 1: Review the CodeReview the code and locate the comments with missing lines (# Fill in missing code). Copy and paste thecode into the Python IDLE. Use the IDLE to fill in the missing lines of code.On the surface this program seems simple. Allow the player to keep guessing until he/she finds the secretnumber. But stop and think for a moment. You need a loop to keep running until the player gets the rightanswer.Some things to think about as you write your loop:The loop will only run if the comparison istrue.(e.g., 1 < 0 would not run as it is false but 5 != 10 would run as it is true)Whatvariableswill you need to compare?Whatcomparison operatorwill you need to use?

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
NoProfessor
Tags
Jax, Nickolas Freeman, Nickolas

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture