
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
A list of 4001 integer numbers is given for project 1 in ‘datafile2.csv’ file. All the input integer. Given data files (https://blackboard.tamuk.edu/bbcswebdav/pid-6061652-dt-content-rid-25816583_1/xid-25816583_1 )
numbers are positive and less than 10000. Find a simple and fast (better running time)
a) Submit your code to solve the problem.
b) Explain why your code is simple and fast.
Note :- Using C or C++ , without using inbuilt functions.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

Knowledge Booster
Similar questions
- Written in python with docstrings if applicable. Thanksarrow_forwardAssign sum_extra with the total extra credit received given list test_grades. Iterate through the list with for grade in test_grades:. The code uses the Python split() method to split a string at each space into a list of string values and the map() function to convert each string value to an integer. Full credit is 100, so anything over 100 is extra credit.Sample output for the given program with input: '101 83 107 90'Sum extra: 8 (because 1 + 0 + 7arrow_forwardWrite a program called ListOddNumbers that prints the below (there is a single space between each number). (5 pnts)Printing odd numbers between 1 and 501 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49arrow_forward
- PYTHON Complete the function below, which takes two arguments: data: a list of tweets search_words: a list of search phrases The function should, for each tweet in data, check whether that tweet uses any of the words in the list search_words. If it does, we keep the tweet. If it does not, we ignore the tweet. data = ['ZOOM earnings for Q1 are up 5%', 'Subscriptions at ZOOM have risen to all-time highs, boosting sales', "Got a new Mazda, ZOOM ZOOM Y'ALL!", 'I hate getting up at 8am FOR A STUPID ZOOM MEETING', 'ZOOM execs hint at a decline in earnings following a capital expansion program'] Hint: Consider the example_function below. It takes a list of numbers in numbers and keeps only those that appear in search_numbers. def example_function(numbers, search_numbers): keep = [] for number in numbers: if number in search_numbers(): keep.append(number) return keep def search_words(data, search_words):arrow_forwardImage 1 is my file and plz provide a screenshot of your code once u finished Thank you! I want to write a method: A method to compute the mean (average) of the data in an array takes one parameter, an array of integers returns the mean (average) of the data in the parameter arrayarrow_forwardAssign sum_extra with the total extra credit received given list test_grades. Iterate through the list with for grade in test_grades:. The code uses the Python split() method to split a string at each space into a list of string values and the map() function to convert each string value to an integer. Full credit is 100, so anything over 100 is extra credit.Sample output for the given program with input: '101 83 107 90'Sum extra: 8 (because 1 + 0 + 7 + 0 is 8) python user_input = input()test_grades = list(map(int, user_input.split())) # test_grades is an integer list of test scores sum_extra = 0 # Initialize 0 before your loop ''' Your solution goes here ''' print('Sum extra:', sum_extra)arrow_forward
- Python program. The sample of sudoko file is: �]q(]q(KKKKKKKKK e]q(KKKKKKKKKe]q(KKKKKKKKKe]q(KKKKKKK KKe]q(KKKKK KKKKe]q(KKK KKKKKKe]q(KKKKKKKKKe]q(KKKKKKKKKe]q (K KKKKKKKKee. IN form of text: 0 4 0 0 0 0 1 7 9 0 0 2 0 0 8 0 5 4 0 0 6 0 0 5 0 0 8 0 8 0 0 7 0 9 1 0 0 5 0 0 9 0 0 3 0 0 1 9 0 6 0 0 4 0 3 0 0 4 0 0 7 0 0 5 7 0 1 0 0 2 0 0 9 2 8 0 0 0 0 6 0 """ Your program should read in a pickle file that encodes a sudoku puzzle, print out a puzzle, and analyze possible answers for a given coordinate (x,y). $python3 sudoku.py sudokus/s01a.p1 3 5 answer.csv $python3 sudoku.py sudokus/s01a.p1 0 1 answer.csv """ The output to the terminal contains these parts: The sudoku puzzle that you retrieved from s01a.p1 file (argv[1]). 0 represents unsolved cell. The contents in the puzzle of row (row id comes from command line argv[2]). The contents in the puzzle of column (column id comes from command line argv[3]). The contents of the 3*3 square that the (row,…arrow_forwardin python Using the value_counts() method, determine how many different possible values there are for the chocolate series in the df DataFrame and how many observations fall into each. Store the output in the object chocolate_values. Take a look at the output. Be sure you understand whether or not there are more chocolate (chocolate == 1) or nonchocolate candies (chocolate == 0) in the dataset from the output.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