Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
1) Use a loop to request a user input from the console.
2) The loop should end when a string, '574', is entered.
Input text can be any content. Just make sure to precisely match the output format below.
Write your code in the ANSWER area provided below (must include comments if using code is not covered in the course).
Example Output
Enter anything (or enter 574 to stop): 0
Enter anything (or enter 574 to stop): 5.5
Enter anything (or enter 574 to stop): -123
Enter anything (or enter 574 to stop): a+b
Enter anything (or enter 574 to stop): LOOP
Enter anything (or enter 574 to stop): 574
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images
Knowledge Booster
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
- Write the code to allow the user to enter a list of positive integers via input boxes and add each number entered to the lstNums list box. Use a Do-While or Do-Until Loop to let the user continue to enter numbers until -1 is entered. Do not add the -1 entry to the list box. In visual Basic please.arrow_forwardThe condition that controls a Do While loop must be true for the loop to be executed. Checkboxes are used in designing the user interface for situations where the user may choose only one of a few choices. Boolean variables are often used to improve the readability / clarity of the program code. For Next loops can have both negative and positive step values. If no item has been selected in a listbox, the SelectedIndex property of the listbox will have a value of zero. A Boolean variable must be initialized after the If instruction in which it is used is executed. A post-test loop is a loop that is designed to be executed at least once. In coding a Select Case instruction, the only thing that may appear after the Select Case keywords is a variable. A Do loop begins with the keyword Do and ends with the keyword Loop. The condition that controls a Do Until loop must be true for the loop to be executed. Radio buttons are used in designing the user interface for situations where the user…arrow_forwardThis code is intended to change the y location of an ellipse that has been created and increase the variable speed when the if statement is true. This code will not work as intended. Explain why it will not work correctly and then type the code correctly. if(y > height) y = 30; speed++;arrow_forward
- No plagarism please! Code with comments and output screenshot is mustarrow_forwardThe following loop will end when.. a =" while a!='xyz': a = input() a. the user inputs the string 'xyz' (without the apostrophes) b. the user inputs anything other than the string 'xyz' (with the apostrophes) c. the user inputs the string 'xyz' (with the apostrophes) d. the user inputs anything other than the string 'xyz' (without the apostrophes)arrow_forward- Please do a simple Python code and correct Flowchart with the correct Loop and shapes. 1. Begin the roulette game by printing “Welcome to the roulette table!”. 2. Prompt the player to enter the bet they would like to make. 3. Check if the bet is valid by comparing it to the list of possible bets. 4. If the bet is not valid, prompt the player to enter another bet. 5. Prompt the player to enter the amount they would like to bet. 6. Check if the amount is valid by checking if it is a digit. 7. If the amount is not valid, prompt the player to enter another amount. 8. Generate a random number between 0 and 36. 9. Use the random number to determine the color of the wheel. 10. Check if the player won by comparing their bet to the outcome. 11. If the player won, calculate the payout and inform the player. 12. If the player lost, inform the player that they lost the amount they bet. - Please do a simple…arrow_forward
- The game should begin by randomly dealing 2 cards to the user's hand, and then calculate and display the total. Next the program should display a prompt, asking the user if he/she wants a Hit or to Stand. If the user selects to Hit the game should randomly deal a new card to the user's hand, and then calculate and display the new total. If the total is greater than 21, then the user Busts, the house wins, and a message indicating these results is displayed. If the total is less than 21, repeat the Hit/Stand Prompt to the user. Continue this process until the user elects to Stand or Busts. If the user selects to Stand, the game then randomly deals two cards to the house, and then calculates those total points. The dealer must continue to Hit as long as the total of the House had is under 17, display the results after each Hit The dealer must Stand once the House hand reaches 17 or higher. Once If the user has not already Busted, compare the User's Hand to the House Hand and determine…arrow_forwardAssume that an 8-bit data word stored in memory is 11101010. Using the Hamming algorithm, determine what check bits would be stored in memory with the data word. Consider if data bit 4 sustains an error and calculate syndrome word.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education