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
Is there a way to have this modified so the user picks a number under 19 and then only odd numbers appear to alter the row, spaces, stars?
Expert Solution
arrow_forward
Step 1: Given
We need to use the Scanner class or we can send the input as command line arguments.
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
- Your task is to take an integer number n & prints the difference between the product of its digits and the sum of its digits.arrow_forwardCome 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_forwardI need some help fixing this code. I need it to let me enter the ISBN number witht the dashes and find the check number my code is below Ill like my teachers direction as a refernce. def main():while True:print('1. Verify the check digit of an ISBN-10')print("2. verify the check digit of an ISBN-13")print("3. Convert an ISBN-10 to an ISBN-13")print('4. Convert an ISBN-13 to an ISBN-10')print('5. Exit')command = input("Enter the Command (1-5): ")if command == '5':breakelif command == '1' or command == '3':# get 10 digit inputISBN = input("Please enter the ISBN-10 number: ")ISBN = ISBN.replace('-', '')while len(ISBN) != 10:print("Please make sure you have entered a number which is exactly 10 characters long.")ISBN = input("Please enter the ISBN number: ")ISBN = ISBN.replace('-', '')print(format(ISBN))if command == '1':print(check_10_digit(ISBN))else:print(convert_10_to_13(ISBN))elif command == '2' or command == '4':# get 13 digit inputISBN = input("Please enter the 13 digit number:…arrow_forward
- show: Lists the items that the wizard is currently carrying along with the index for each item and the weight of that item. See sample runs below. As shown in the sample this function also prints the total weight of the items along with the max weight limit of 100 lbs. Hint: You can use the sum function in Python to calculate the sum of weights. E.g. sum(weights) will return the sum of all the items in the weights list. grab_item: Add a new item while enforcing the following policy: There is a limit of 4 on the number of items the wizard can carry and limit of 100 lbs on the total weight the wizard can carry. So specifically, if the wizard is already carrying 4 items, print message that “You can't carry anymore items. Drop something first.” And return out of the function. Otherwise prompt the user for the name and the weight of the new item. Next check whether with the addition of the new item, the total weight will exceed the limit of 100 lbs. If so, print a message saying weight…arrow_forwardWrite a program that asks the user to enter 10 numbers, that range from 10-100. Make sure that you do not accept any numbers less than 10, if a user enters a number that is less than 10 then ask him again. Once the user enters all 10 numbers, sort the numbers entered in ascending order and print them out. CSharparrow_forwardy = (z - x) 2 + (у--); if x=2, y=6, z=10arrow_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