
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
Concept explainers
Question
![Write a Python program that allows user to repeatedly enter a series of float numbers,
until the string end is entered. For each number entered, calculate and print its double
(multiply by 2).
Note that
• (1) Sentinel must be used.
• (2) The placement of data type conversion is critical.
[Run your program in Python IDLE to verify if it works correctly as described above]
Enter a float number or 'end' to stop: 2.4
The double of 2.4 is 4.8
Enter a number or 'end' to stop: 4.123
The double of 4.123 is 8.246
Enter a number or 'end' to stop: end](https://content.bartleby.com/qna-images/question/82364f35-b232-491b-ae0e-1b5c453de482/a1185c7f-e006-4747-bf66-c6d2d88be89f/dhji2t_thumbnail.jpeg)
Transcribed Image Text:Write a Python program that allows user to repeatedly enter a series of float numbers,
until the string end is entered. For each number entered, calculate and print its double
(multiply by 2).
Note that
• (1) Sentinel must be used.
• (2) The placement of data type conversion is critical.
[Run your program in Python IDLE to verify if it works correctly as described above]
Enter a float number or 'end' to stop: 2.4
The double of 2.4 is 4.8
Enter a number or 'end' to stop: 4.123
The double of 4.123 is 8.246
Enter a number or 'end' to stop: end
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 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 a C++ program that will print out the following simple shapes: triangle, rectangle and diamond using different characters for each shape. Requirements:- each shape uses a different character and it must be exactly 5 lines.- for this exercise, please do not use loop but only simple printing characters.arrow_forward[Python Language] A common back-of-the-envelope technique for estimating a runner’s marathon time is to take their best half-marathon time, multiply by two and add ten minutes. This works pretty well unless the marathon course is hilly.If it is hilly, we add an extra 20 minutes to the estimate. Write a program that takes two lines of input: a float giving the half- marathon time in minutes and an integer indicating whether the marathon course is hilly(1) or not (0). It prints a float giving the estimated number of minutes the runner will take to run the full marathon. Write your pro- gram in a file named marathon.py.arrow_forward
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