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
Question
Expert Solution
arrow_forward
Problem description :
- The above needs to be answered in Python.
- Here pure python means the code should not require any external file or module for successful run of the code.
Step by stepSolved in 2 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
- in python i need help writing a program that inclues all of the following program has to include at least one of each of the following: if statements loops arrays (lists) files functionsarrow_forwardIntro to Python Programming:arrow_forwardneed help finishing Python code. I need help calculating the average school grade which is an integer. The current code doesn't calculate the average grade correctly. Also when I enter 0 to exit it get an error (please run code on your end to find the issues with calculating the average grade and error when enter 0). CODE import decimalfrom decimal import Decimal class GradeBook: count = 0 def __init__(self, name, grades=[]): self.name = name GradeBook.count += 1 print("There are",GradeBook.count,"students in the GradeBook") self.grades = [] def quizScore(self,score): self.grades.append(score) def currentAverage(self): sum = 0 for i in self.grades: sum += i avg = sum/len(self.grades) return avg name1 = input("Please enter the name for Student 1:") Student1 = GradeBook(name1) name2 =…arrow_forward
- C++input a positive integer,output binaryuse loopcan't use recursive or other function example: n = 5 output 101 n = 15 output 1011arrow_forwardPython please: Three fictional companies have the following value per stock share: Gaggle: $212.41 Lotus: $150.25 PennyStocksRUs: $0.84 Write a program to read the number of stock shares owned per company, and output the total dollar value of all owned stock shares. NOTE: Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print(f'Share Portfolio Value: ${portfolio_value:.2f}') For example, if the input is 10 15 20 where 10 is the number of shares of Gaggle, 15 is the number of shares of Lotus, and 20 is the number of shares of PennyStocksRUs; the output is Share Portfolio Value: $4394.65 For this exercise, assume all input values are nonnegative. Input to programarrow_forwardPYTHON PROGRAMMING ONLY PLEASE CODE IS CORRECT BELOW COULD YOU PLEASE INCLUDE INPUT VALIDATION INTO THE CODE THATS THE ONLY THING TO BE DONE # Getting the number of days from the usernum_days = int(input("Enter the number of days: ")) # Initializing variablessalary = 0.01 # Initial salary on the first daytotal_pay = 0 # Initializing total pay to 0 # Printing a table headerprint("Day\tSalary")print("------------------") # Calculating and displaying the salary for each dayfor day in range(1, num_days + 1): total_pay += salary print(f"{day}\t${salary:.2f}") salary *= 2 # Doubling the salary for the next day print("------------------") # Displaying the total pay in dollarsprint(f"\nTotal pay over {num_days} days: ${total_pay:.2f}")arrow_forward
- python onlystart from here: def ask_for_age(): age = int(input('Enter the age of a family member: ')) return agearrow_forwardInstruction: It should be a C++ PROGRAM INCLUDE THE HEADER FILE, MAIN CPP, AND BSTREE.CPP There is a real program developed by a computer company that reads a report ( running text ) and issues warnings on style and partially corrects bad style. You are to write a simplified version of this program with the following features: Statistics A statistical summary with the following information: Total number of words in the report Number of unique words Number of unique words of more than three letters Average word length Average sentence length An index (alphabetical listing) of all the unique words (see next page for a specific format) Style Warnings Issue a warning in the following cases: Word used too often: list each unique word of more than three letters if its usage is more than 5% of the total number of words of more than three letters Sentence length : write a warning message if the average sentence length is greater than 10 Word length : write a warning message if the…arrow_forwardMy code(python): strng = input("Enter a sentence or phrase:\n\n")print ("You entered:", strng)def get_num_of_characters(strng): countChar = 0 for i in range(0, len(strng)): countChar = countChar + 1 return countChar;def output_without_whitespace(strng): strWithoutSpace = "" for i in range(0, len(strng)): if strng[i] != ' ': strWithoutSpace = strWithoutSpace + strng[i] return strWithoutSpace;print ("\nNumber of characters:",get_num_of_characters(strng))print ("String with no whitespace:",output_without_whitespace(strng)) (1) Prompt the user to enter a string of their choosing. Output the string. Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself. (2) Complete the get_num_of_characters() function, which returns the number of characters in the user's string. We encourage you to use a for loop in this function. (3) Extend the program by calling the…arrow_forward
- C++ - No library functions like atoi Create a machine code program to input two one-digit numbers, add them, and output the one-digit sum. Submit your "machine code" followed by a 'zz.' User Input one: 3 Input two: 4 Output the one-digit sum: 7 zzarrow_forwardLAB RESTRICTIONS, PLEASE READ:- Do not add any imports, the ones that you need will be given to you.- Do not use recursion.- Do not use try-except statements, you should be able to anticipateor prevent any errors from happening at all! - Code in python - Should work for given doctest def longest_unique_substring(s: str) -> str:"""Given a string <s>, return the longest unique substring that occurs within<s>.A unique substring is a substring within <s> which DOES NOT have anyrepeating characters. As an example, "xd" is unique but "xxd" is not.If there are two equal length unique substrings within <s>, return the onethat starts first (i.e., begins at a smaller index). >>> longest_unique_substring('aab')'ab' """arrow_forwardAssignment #2 Instructions: Through this programming assignment, the students will learn to do the following: Learn to work with command line options and arguments Gain more experience with Makefiles Gain more experience with Unix Learn to use some of the available math functions available with C Usage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to perform a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the…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