Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the solutions so I can copy and paste Safari File Edit View History Bookmarks Window Help Tue 7:12 PM QE learn.zybooks.com C Updates

I need the solutions so I can copy and paste

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Safari File Edit View History Bookmarks Window Help Tue 7:12 PM QE learn.zybooks.com C Updates Available Install C y! Section 4.2 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.2: While loops zyBooks catalog ? Help/FAQ linda ayodele KB PyCharm CE ACTIVITY Write an expression that executes the loop body as long as the user enters a non-negative number. RTF letter for aid Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message. Sample outputs with inputs: 9 5 2 -1 DOCX Body new resume Body Body Done. 1 user_num = int(input()) while ''' Your solution goes here " "': 1 test print(' Body') user_num = int(input()) 6 print( Done. ') All tests passed Run code_Revisited.docx.pdf (page 1 of 2) MAY 25 WSafari File Edit View History Bookmarks Window Help Tue 7:12 PM QE learn.zybooks.com C Updates Available Install C y! Section 4.2 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.2: While loops EzyBooks catalog Help/FAQ linda ayodele KB PyCharm CE Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the RTF loop. letter for aid Sample output with input: 20 10.0 5. 0 DOCX 2.5 new resume 1. 25 0. 625 Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message. user_num = int(input()) 1 test Screen Shot AWNY "Your solution goes here "" passed 2021-05...2.37 PM All tests passed code_Revisited.docx.pdf (page 1 of 2) MAY 25 WSafari File Edit View History Bookmarks Window Help [ Tue 7:21 PM Q E learn.zybooks.com Updates Available Install C y! Section 4.3 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.3: More while examples zyBooks catalog Help/FAQ linda ayodele KB PyCharm CE Write an expression that continues to bid until the user enters 'n'. RTF Sample output with inputs: "y" y' 'n' letter for aid I'll bid $7! Continue bidding? I'll bid $15! Continue bidding? I'll bid $23! DOCX Continue bidding? new resume import random random. seed(5) 1 test WN passed 4 keep_going = ' - next_bid = 0 All tests passed 7 while '" Your solution goes here " ": next_bid = next_bid + random. randint(1, 10) print('I 'll bid ${}!'. format(next_bid)) Screen Shot 10 print('Continue bidding?', end=' ') 2021-05...2.37 PM 11 keep_going = input() Screen Shot 2021-05...2.45 PM Run Feedback? code_Revisited.docx.pdf (page 1 of 2) MAY 25 WSafari File Edit View History Bookmarks Window Help [ Tue 7:21 PM Q E learn.zybooks.com Updates Available Install C y! Section 4.3 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.3: More while examples zyBooks catalog ? Help/FAQ linda ayodele KB PyCharm CE CHALLENGE ACTIVITY 4.3.3: While loop: Insect growth. RTF Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow letter for aid each number with a space. Sample output with input: 8 DOCX 8 16 32 64 new resume 1 num_insects = int(input()) # Must be >= 1 1 test "Your solution goes here " " passed All tests passed Screen Shot 2021-05...2.37 PM Screen Shot 2021-05...2.45 PM Run Screen Shot Feedback? 2021-05...1.48 PM code_Revisited.docx.pdf (page 1 of 2) MAY 25 WSafari File Edit View History Bookmarks Window Help [ Tue 7:24 PM Q E E learn.zybooks.com C Updates Available Install C y! Section 4.4 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne. 4-4 Project One Reminder - IT-140-J5100 Int.. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.4: Counting zyBooks catalog Help/FAQ linda ayodele KB PyCharm CE ACTIVITY 4.4 . 1 . VVITIC JUUP. FITTIL I TO IV. Write a while loop that prints from 1 to user_num, increasing by 1 each time. RTF letter for aid Sample output with input: 4 AWNP DOCX Screen Shot 2021-05...1.57 PM new resume 1=1 1 test user_num = int(input()) # Assume positive passed OUTAWNY Your solution goes here "" All tests passed Screen Shot 2021-05...2.37 PM Screen Shot 2021-05...2.45 PM Run Screen Shot 2021-05...1.48 PM Feedback? code_Revisited.docx.pdf (page 1 of 2) MAY 25 WSafari File Edit View History Bookmarks Window Help NE [ Tue 7:24 PM Q E learn.zybooks.com Updates Available Install C y! Section 4.4 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.4: Counting zyBooks catalog Help/FAQ linda ayodele KB PyCharm CE Retype and run, note incorrect behavior. Then fix errors in the code, which should print num_stars asterisks. while num_printed != num_stars: RTF print ( '*' ) letter for aid Sample output with input: 3 * DOCX * Screen Shot 2021-05...1.57 PM new resume 1 num_printed = 0 1 test 3 num_stars = int(input()) "Your solution goes here """ All tests passed Screen Shot 2021-05...2.37 PM Screen Shot 2021-05...2.45 PM Run Feedback? code_Revisited.aocx.pal (page 1 01 2) MAY 25 WSafari File Edit View History Bookmarks Window Help [ Tue 7:27 PM QE E learn.zybooks.com C Updates Available Install C y! Section 4.5 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int.. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.5: For loops zyBooks catalog ? Help/FAQ linda ayodele KB PyCharm CE Feedback? CHALLENGE RTF ACTIVITY 4.5.1: For loop: Printing a list letter for aid Write an expression to print each price in stock prices. Sample output with inputs: 34.62 76.30 85.05 DOCX Screen Shot $ 34. 62 2021-05...1.57 PM new resume $ 76.30 $ 85. 05 Screen Shot 2021-05...4.28 PM 1 # NOTE: The following statement converts the input into a list container stock_prices = input(). split() 1 test passed for " Your solution goes here " ": print('$', price) Screen Shot Screen Shot All tests 2021-05...4.34 PM 2021-05...2.37 PM passed Screen Shot 2021-05...2.45 PM Screen Shot 2021-05...1.48 PM Run code_Revisited.docx.pdf (page 1 of 2) MAY 25 WSafari File Edit View History Bookmarks Window Help [ Tue 7:27 PM QE learn.zybooks.com Updates Available Install C y! Section 4.5 - IT 140: Introduction to Scripting... 4.2. While loops.pdf : IT IT-145 : Southern Ne.. 4-4 Project One Reminder - IT-140-J5100 Int. BLUE THERAPY: EPISODE 4 *R Do you want to restart to install these updates now or try tonight? Later yBooks My library > IT 140: Introduction to Scripting v3 home > 4.5: For loops zyBooks catalog Help/FAQ linda ayodele KB PyCharm CE Write a for loop to print each contact in contact_emails. RTF Sample output with inputs: 'Alf' 'alf1@hmail.com' letter for aid mike. filt@bmail. com is Mike Filt s. reyn@email. com is Sue Reyn narty042@nmail. com is Nate Arty alf1@hmail. com is Alf DOCX Screen Shot 2021-05...1.57 PM new resume contact_emails = { 'Sue Reyn' : 's. reyn@email. com' , 1 test passed Screen Shot Mike Filt' : 'mike. filt@bmail.com' , 2021-05...4.28 PM "Nate Arty' : 'narty042@nmail. com' All tests passed new_contact = input() 8 new_email = input() 9 contact_emails [new_contact] = new_email Screen Shot Screen Shot 10 2021-05...4.34 PM 2021-05...2.37 PM 11 ' Your solution goes here " " ' 12 Screen Shot Screen Shot 2021-05...7.36 PM 2021-05...2.45 PM Run Feedback? Screen Shot 2021-05...1.48 PM code_Revisited.docx.pdf (page 1 of 2) MAY 25 W

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

Students also viewed these Programming questions