
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

Transcribed Image Text:Q3/A- Estimate the result when you execute the following code by using Qbasic programming
For m take the following values
100,90,80,70,60,50,40,30,20,10,30:
Input "enter student mark"; m
If m - 100 Then
Print "ful mark"
Elself m >= 90 Then
Print "accelent"
Elself m> 80 Then
Print "very good"
Elself m>- 70 Then
Print "accepted"
Print "fail"
Else
End If
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

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
- Pythom: Least Common Multiple, Greatest Common Factor (Grade Factor 1) This assignment assess problem solving ability and the use of the modulo operator, functions, lists and nested loops. The Modulo (%) operator returns a remainder of the two numbers divided. e.g. 9 % 2 will yield a 1 because 9/2 = 4 and the remainder is 1. Write one program that will compute both the Least Common Multiple, and the Greatest Common Factor of two random numbers between 2 and 30. The program will display all factors and multiples of the two numbers. When displaying the multiples of the numbers, only display up to the first input times the second input. Use functions to compute the answers. Loop the program so that the user try again. create the loop so that hitting enter will continue. The example is below: Integer1: 12Integer2: 3 The Multiples of 3 are 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, The Multiples of 12 are 12, 24, 36, The lowest common Multiples is 12 The Factors of 3 are…arrow_forwardPLEASE SOLVE BOTH 2.) and 3.) 2.) What will be displayed when the following code is executed?int number = 6;while (number > 0) {number -= 3;System.out.print(number + " ");}a. 6 3 0b. 6 3c. 3 0d. 3 0 -3e. 0 -33.) Which of the following loops correctly computes 1/2 + 2/3 + 3/4 + ... + 99/100?A:double sum = 0;for (int i = 1; i <= 99; i++) {sum = i / (i + 1);}System.out.println("Sum is " + sum);B:double sum = 0;for (int i = 1; i < 99; i++) {sum += i / (i + 1);} System.out.println("Sum is " + sum);C:double sum = 0;for (int i = 1; i <= 99; i++) {sum += 1.0 * i / (i + 1);}System.out.println("Sum is " + sum);D:double sum = 0;for (int i = 1; i <= 99; i++) {sum += i / (i + 1.0);}System.out.println("Sum is " + sum);E:double sum = 0;for (int i = 1; i < 99; i++) {sum += i / (i + 1.0);}System.out.println("Sum is " + sum);arrow_forwardSYNTAX ERROR HELP - PYTHON This also happens for several other 'return result' lines in the code. import randomdef rollDice(): num1 = random.randint(1, 6) num2 = random.randint(1, 6) return num1, num2def determine_win_or_lose(num1, num2): result = -1 total = num1 + num2print(f"You rolled {num1} + {num2} = {total}")if total == 2 or total == 3 or total == 12: result = 0elif total == 7 or total == 11: result = 1else: print(f"point is {total}") x = determinePointValueResult(total)if x == 1: result = 1else: result = 0 return resultdef determinePointValueResult(pointValue): total = 0 result = -1while total != 7 and total != pointValue: num1, num2 = rollDice() total = num1 + num2if total == pointValue: result = 1elif total == 7: result = 0print(f"You rolled {num1} + {num2} = {total}")return resultwhile i < n: num1, num2 = rollDice() result = determine_win_or_lose(num1, num2)if result == 1: winCounter += 1 print("You…arrow_forward
- Summary Interest on a credit card's unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 payme If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: interest averageDailyBalance * 0.0152 Instructions Write a program that accepts as input netBalance, d1, payment, d2, and interest rate per month ( interestRate).arrow_forwardSolve all after then I will give u like otherwise dislikearrow_forwardComplete the following Codearrow_forward
- Q3: By using Select-Case; write a program to calculate (BMI body mass index) (11 M) weight BMI = hieght And print the result as follows Underweight = 30arrow_forwardBranchingarrow_forward7) What is the value of r after the following code executes? mySet (2, 3, 5, 7, 11) yourSet = (5, 7, 2, 11, 3) r = yourSet == mySet a. (5,7,2, 11, 3) b. [2, 3, 5, 7, 11) c. True d. error 13) How can the following algorithm be described? position = 0 while position < len(lyst): if target == lyst[position]: return position position += 1 return -1 a. sequential search b. bubble sort c. binary search d. selection sortarrow_forward
- Q5/A- create a QBasic program that will determine the price of traveler ticket based on customer s age. The program must able to input the customer's age then set the conditions so the price is determined as follows: age 0-5 age 6-20 price-1 50001D(Iraqi dinar) price 25000LD(Iraqi dinar) price-40 000ID(Iraqi dinar) age >21 B-Indicate what is acceptable and what is not acceptable from the following Q-Basic sentences with a reason (Choose 5 only) 1. KB5 2. Schools 3. AB$3 4. Print 5. LETX YS 6. "$565" Q6/A-By using (Qbasic or MS Excel) write a program to compute X 1+2+3+ +100 X-1x2+2x4+3x6++100x200 B- Answer the following question: (Choose Sonly) 1. Explain how to add a transition effect to the PowerPoint file.? 2. Add worksheet in Ms-Excel? 3. Add the watermark in your name to your Word document? 4. List and explain the most popular computer storage units? 5. What is the difference between the Save and the Save as commands? 6. List methods for inserting New Slide in the Ms. Power point?arrow_forwardPart 2 - OddOrEven ClassWrite a program that prompts the user to enter an integer. The program should display “The input is odd" to the screen if the input is odd and displays “The input is even" to the screen if the input is even. Hint: Consider using the mod (%) operatorarrow_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