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
thumb_up100%
using python language
- Using the piece of code on the previous slide, modify the code removing the x += 1 portion and run the code.
What happens?
- Now modify the code to print the numbers but in reverse order
- Lastly, modify the code to print the numbers 1 through 10 which are not divisible by 3
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
- Transcribed Image Text Write a loop of your choice that continues to read an integer x as long as x not divisible by 5 and 3. Complete the missing code in the space provided below. { int x=1; .....arrow_forwardWrite an interactive program that gives you the option to generate one of the turtle graphics images. The program should prompt the user for a value between 1 and 5 and generate a corresponding turtle graphics image. If the user enters Q or q the program should terminate. If the user enters anything else an appropriate error message should be displayed. This is programmed in Python 3.arrow_forwardWrite the Aseba code to create a 1-minute timer. At the end of 1 minute, make the robot beep using call sound.freq(440,10). It should continue to beep once every minute. Specify the values of any constants you use.arrow_forward
- Come up with a nested loop that prints the following table of numbers out. Don’t worry about getting the columns lined up properly (you can use \t after each number to help). 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 5 10 15 20 25 This is effectively a multiplication table, where each number is its row number * its column number. To get this, you can take the 1 2 3 4 example pattern from the slides and modify it. Make it 5 rows instead of 4 and adjust the columns to print 1-5 instead of 1-4. Lastly, modify the print statement to print the row number * the column number instead.arrow_forwarduse java Write a program to display the number, its square and its cube of the integers from 1 to 10. You may use appropriate methods from Math class (you may need to use the casting). Use a while and then the for loop.arrow_forwardFactorial of a number n is denoted as n! And the value of n! Is: 1*2*3... (n-1)*n. Create Java Program to find factorial of a positive integer number using the following Loops: a. for Loop b. while loop Valid input is less than or equal to 15 (Input <= 15) only, otherwise the input is Invalid. Please see the attached image for the Output format. Please don't answer my question if you don't read the instructions carefully, this is my last question so please cooperate.arrow_forward
- Only by using 3 seven segment display(without using lcd display), similar to as shown in the picture, using Tinkercad, build a calculator. It should have 3 7-segment displays and a number pad. The system should start with a summation of 0. You don't have to display negative numbers. The user should be able to press numbers to enter upto 3 digit number. This number should be displayed on the 7 segments. If the user presses A, the number should be added to the current number, if user presses B, the number should be subtracted and the display should be emptied to accept another number. If user presses C at any time, current summation should be displayed. D should 0 the current summation.arrow_forwardUse Kotlin. Create a program to display a series of fibonacci up to the given number and calculate the sum of its term.arrow_forwardYour program must keep on prompting the user if an incorrect time was given; see below for examples. The program then converts the time into the usual US format with hours from 1 to 12, the minutes and an AM or PM marker. This conversion works like follows: • 0 hours become 12 o’oclock AM, • 1 through 11 hours become 1 through 11 hours AM, • 12 hours become 12 o’clock PM, • 13 through 23 hours become 1 through 11 hours PM, with a subtraction of 12. The program then displays the time in the usual US format. Please use care when displaying the minutes, as an extra zero needs to be displayed for minutes 0 to 9. See the examples below for details. Examples of input and output: Please enter the hours on a 24 hour clock (0-23): 15 Please enter the minutes (0-59): 7 You entered 3:07PM Please enter the hours on a 24 hour clock (0-23): 27 Please enter the minutes (0-59): 17 Sorry, your input is incorrect. Write a program clock.c that asks the user to input a moment in time as an hour…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