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
Topic Video
Question
thumb_up100%
1- Write a program that can calculate the class average for a number of students. The user should be able to enter the grades, use sentinel-controlled repetition to manage input. (python)
Sample Output:
Enter grade, -1 to end: 75
Enter grade, -1 to end: 94
Enter grade, -1 to end: 97
Enter grade, -1 to end: 88
Enter grade, -1 to end: 70
Enter grade, -1 to end: 64
Enter grade, -1 to end: 83
Enter grade, -1 to end: 89
Enter grade, -1 to end: -1
class average is 82.5
2- Write a program that reads in two integers and determines and prints whether the first is a multiple of the second. (Hint: Use the modulus operator.
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 2 steps with 5 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
- Python. Match the control structure with the most accurate definition. Example: Conditionals: a) c) and e) Conditionals: Repetition: Functions: a) A group of statements which can be executed on demand. b) A statement which is executed only of a result of an expression is False c) A statement which is executed only of a result of an expression is True d) A block of code which is executed 0 or more times depending on if the result of an expression in True. e) A group of statements which are never executed. f) Something that happens over and over no matter what.arrow_forwardREPETITION CONTROL STRUCTURE (FOR) Instruction: Write a Java program that reads a positive, non-zero integer as input and checks if the integer is deficient, perfect, or abundant. A positive, non-zero integer, N, is said to be perfect if the sum of its positive proper divisors (i.e., the positive integers, other than N itself, that divide N exactly) is equal to the number itself. If this sum is less than N, the number is said to be deficient. If the sum is greater than N, the number is said to be abundant. The first few perfect numbers are 6, 28, 496, and 8128. Illustrations: Number Factors of the number less than itself Sum of Factors 3, 2, 1 14, 7, 4, 2, 1 6 6 28 28 For example, the number 6 is perfect, since 6 = 1 + 2 + 3, the number 8 is deficient, since 8 >1 + 2 + 4, while the number 12 is abundant, since 12<1 + 2 + 3 + 4 + 6. Sample Input/Output: Depicted below are sample outputs when the program is executed (the items in bold characters are input from the user, while the items…arrow_forwardPython pleasearrow_forward
- C PROGRAM Create a c program that will convert number figures into words 1. You can use user-defined functions, string, array, and loops 2. Maximum input limit is 10000.00 Sample output (bold letters is for input) Enter amount in Peso: 143.50 You just entered P145.50 equivalent to One Hundred Forty Three and Fifty Centavos. Do you want to convert another amount? [Y|N]: Narrow_forwardc languagearrow_forwardDevelop a body mass index (BMI) calculator program that reads body weight and height as inputs and calculate the BMI based on the following formula: BMI - Weight/Height Using the caleulated BMI, determine the individual weight category based on the following Table I and the program will count how many user's BMI get a particular category: Table 1 BMI Category > 30 25- 30 18.5-24.9 You are obese Your weight is overweight You have an ideal weight You are too thin S18.5 Use if..else statements or switch statements and loop where it is appropriate and create a program with the following output Sample program's output is as below, the rumbers in bold/underline are user's input: ******..* PROGRAM TO CALCULATE BMI CATEGORY*****.. Please enter your weight (kg) : Please enter your height (m) Your BMI is 19.38, Xour have an ideal weight 56 1.7 Would you like to calculate arother BMI? y- yes, n noy Please enter your weight (kg) : Please enter your height (m) Your BMI is 30.47. 78 1.6 You are…arrow_forward
- program must include a processing loop that allows multiple sets of data to be processed and the program should be terminated when there is no more data to process Develop a program in python that allows the user to enter a start value of 1 to 4, a stop value of 5 to 12 and a multiplier of 2 to 8. The program must display a multiplication table with results using these values. For example, if the user enters a start value of 3, a stop value of 7 and a multiplier value of 3, the table should be displayed as follows: Multiplication Table 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 Run the program with the following values: Start Stop Multiplier 2 10 4 4 12 6arrow_forwardcomputer programing topic Repetition Control Structure Required : containing the code and 3 image files(Sample1, Sample2 and Sample3) containing different sample input/output of theprogram. Thank you so much God bless :)arrow_forwardComputer programming with pythonarrow_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