EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Please show the code for each part of this assignment using python in a jupyter notebook. The data file previoulsy used that is referenced in the first part is included
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
Similar questions
- please use spyderarrow_forwardUse Python 3 for this question. Do the sentiment analysis based on a text file which contains numerous tweets in its raw text format. All tweets collected in this file contains a key word specified by the instructor. The key word being used is “Trump”. You can use the raw tweets file provided by the following link: tinyurl.com/46ntt3a5. You will need to convert this to a .txt file for this assignment. Your raw tweets file size at least needs to be 350K. After you have the raw tweets file ready, you need to perform the following tasks in a Jupyter notebook file. First you need to clean up the tweet file content to the best you can. For each word that is not a “stop word” (and, the, a, is, as, …), assign a value +1 for positive sentiment or a value -1 for negative sentiment. A list of “positive” words will be provided to you. You can easily find a list of “stop words”, and a list of “negative” words online. For the words that is not in positive/negative/stop words, count as ‘others’.…arrow_forwardDevelop an M-file to create a plot of volume versus depth, and test your program with cylinder(3,5,'Volume versus depth for horizontal cylindrical tank').arrow_forward
- Take a sufficient sample of Gutenberg's couple of digital books of your choice. Create (random?!) samples of 200 partitions of the book. Make sure each partition or record has 100 words. Generalize the program so that you can replicate that for multiple books. Maintain the label for each of the text segments or records or document, label them as a, b and c etc. as per the book they belong to. Use Regular Expressions and Pandas to manipulate the data and serialize them.arrow_forwardCan someone help me with this question?? It will be highly appreciatedtedarrow_forwardUsing onlinegdb, you're to place these two function prototypes in a file named OddEven.h: // Programmer: . . . // Description: Prototypes for functions to determine if the passed // integer value is odd or even. // Pass in the integer value to be tested. // Function returns "true" if the value is odd. // Function returns "false" if the value is even. bool IsOdd(int value); // Pass in the integer value to be tested. // Function returns "true" if the value is even. // Function returns "false" if the value is odd. bool IsEven(int value); Next, you are to implement the two functions, placing the code in a file named OddEven.cpp. Finally, you are to implement your main C/C++ program placing the code in a file named main.cpp. The program should do the following: 1. Prompt the user to enter an integer value. 2. Check the user input and re-prompt if the value input has a fractional part. 3. Take the integer value input and make calls to the functions to determine if the value is odd or even,…arrow_forward
- You will have an orthogonal triangle input from a file and you need to find the maximum sum of the numbers according to given rules below; 1. You will start from the top and move downwards to an adjacent number as in below. 2. You are only allowed to walk downwards and diagonally. 3. You can only walk over NON PRIME NUMBERS. 4. You have to reach at the end of the pyramid as much as possible. 5. You have to treat your input as pyramid. According to above rules the maximum sum of the numbers from top to bottom in below example is 24. *1 *8 4 2 *6 9 8 5 *9 3 As you can see this has several paths that fits the rule of NOT PRIME NUMBERS; 1>8>6>9, 1>4>6>9, 1>4>9>9 1 + 8 + 6 + 9 = 24. As you see 1, 8, 6, 9 are all NOT PRIME NUMBERS and walking over these yields the maximum sum. Write code for below problem in C languagearrow_forwardYou have been hired at an open-air mine. You are to write a program to control a digger. For your task, you have been given a `map' of all the underground resources in the mine. This map comes as a file. The file has n rows. Each row has n space-separated integers. Each integer is between zero and one hundred (inclusive). The file should be understood to represent a grid, n wide by n deep. Each square in the grid can contain valuable resources. The value of these resources can go from zero (no resources) to 100 (max resources). The grid maps the resources just below the surface, and down to the lowest diggable depths. The digger starts at the surface (so, just on top of the topmost row in the grid)—at any horizontal position between 1 and n. The digger cannot dig directly downwards, but it can dig diagonally in either direction, left-down, or right-down. In its first time-step, it will dig onto the first row of the grid. In its second time-step, it'll hit the second row, and so on.…arrow_forwardModify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following: How to format each dictionary item as a text string in the input file. How to covert each input string into a dictionary item. How to format each item of your inverted dictionary as a text string in the output file. Create an input file with your original three-or-more items and add at least three new items, for a total of at least six items. Include the following in your Learning Journal submission: The input file for your original dictionary (with at least six items). The Python program to read from a file, invert the dictionary, and write to a different file. The output file for your inverted dictionary. A description of how you chose to encode the original dictionary and the inverted dictionary in text files. Show more... Modify your program from Learning Journal Unit 7 to read dictionary items from a…arrow_forward
- In a text file, I have two numbers each line. The numbers are the employee ID and the number of hours the employee work. My goal of this program is to read the both employee ID and the number of hours the employee work and print it out in the main program. If the list of employee id is not in order, sort it in order and still print it out in the main program. Additionally, after printing them out, print out the total number of employees and the total number of hours all the employee work. Write this in java For example File.txt EmployeeID Number of Hours Work 3 12 2 20 1 40 5 20 7 9 In the main program print: EmployeeID Number of Hours Work 1 40 2 20 3 12 5 20 7 9arrow_forwardProfessor Potter, a punning pedantic, practices puzzling her students. She has left a secret message, of unknown length, encoded in a file for you to unravel. The setup is simple: each line of the file contains one char and one non-negative integer. The key to reading the message is organizing the characters in the proper order. The integer indicates the position of the character within the message. For example: e 2 b 1 a 3 h 5 c 4 spells 'beach' when unraveled. Write a program that will: Ask the user for the name of a file Check to see that the file exists and contains some data. Open and read this file exactly once Using your MessageDecoder class, unravel and display the message Offer to do it again on another file Required classes: You will create and submit 2 classes: MessageDecoder class: Responsible for converting a scrambled message file into plain text. Contains a public method getPlainTextMessage() that returns the String object. The scrambled file must be scanned only once…arrow_forwardWrite R programing to perform the following: Q1 Read voter.xlsx file and store all data in a data frame. a. Using filter function, find all female voters whose age is between 30 and 40 (both inclusive). b. Using filter function, find all voters whose district code and zip code are odd numbers. c. Using filter and arrange functions, sort all voters in 77002 by age in descending order. d. Using filter, arrange, and select functions, sort all male voters by name in ascending order and display only their names, voter IDs, and ages. e. Using filter and select functions, display only the name and gender of the voters whose district ID is less than 10 and zip code is greater than 77010. f. Using mutate function, add Voting Day column by getting the remainder of District ID divided by 7 and adding 1 to the remainder. Therefore, voting day of each voter will be a number from 1 to 7. For instance, the voting day of Heather will be 2 since her district ID is 92 and the remainder of 92/7 is 1. g.…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT