te a program that reads data from a file containing integers that ends with -999. Output the numbers that are divisible by 7 Output the numbers that are divisible by 11 Output the numbers that are not divisible by 7 or 11.
Q: Suppose program P1 requires T1(n) = n4 operations and P2 requires T2(n) = 2n. Suppose that your…
A: Running time of these pogram with P1 and P2 operations executing 106% /sec has been solved in step2
Q: Write a program that reads integers user_num and div_num as input, and output the quotient (user_num…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: 1) Write a "C" program that finds and prints all the paths (if exists) between the given two cities…
A: Only one path from first city to second can be found here. We used DFS based matrix traversal.…
Q: Overload the + operator as indicated. Sample output for the given program with inputs 7 3: First…
A: We need to write a C++ code for the given scenario.
Q: write a merge method that can take any number of sorted arrays and merge them all into one sorted…
A: I give the code in Java along with the output and code screenshots
Q: Given a money system, is it possible to give an amount of coins and how to find a minimal set of…
A: In this problem we will consider a set of different coins C{1, 2, 5, 10}. There are an infinite…
Q: 6. Show the printout of the following code: public class ArraysBasic { public static void…
A: Answer is given below
Q: Multiple implementations of the compiler's back end may be compared and contrasted.
A: Please check the solution below
Q: If we know that the CPU is printed and that the electrical speed cannot be changed, but nevertheless…
A: Introduction: Signal proliferation speed is not a limiting constraint in modern CPUs. Think about…
Q: Draw the tree step by step Delete From AVL tree for the following elements 9,8,12,15,18
A: Introduction Deletion in AVL Trees:Deletion is performed identical as during a Binary Search…
Q: Starting with the file exceptions.py, implement exception handling for two types of exceptions that…
A: The given below program is in python using two exceptions.
Q: Select all of the IP addresses which exist in the subnet 10.1.0.0/16 10.0.0.10 10.1.0.10 10.2.0.1…
A: Dear Student, Detailed answer of your question is given below -
Q: (1) Write the pseudo-code or draw a flowchart and (2) Write a C++ program, that prompts the user to…
A: the solution is an given below :
Q: Write a program that reads a list of integers into a list as long as the integers are greater than…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT---------
Q: It's a good idea to consider using structured language when discussing processes that aren't part of…
A: Given: It is worthwhile to think about using structured language to describe processes that are not…
Q: Briefly explain and define “public space.”
A: Public are the ordinary people within a country. Let's define Public space and how it is used.
Q: Question 22: Statement: find the index of a value in a list Write a statement that finds the index…
A: In python, we have index() method to find the first instance of any value from the list. It returns…
Q: Which is NOT something a Pyhton object has? dataframe internal data representation set of procedures…
A: Check next step
Q: Explain what is a cookie? Why do websites use cookies? Provide 3 reasons?
A: A cookie is a piece of data from a web page that is stored in the web browser and that the web page…
Q: Create the data structures for a standard deck of cards. Describe how you would To implement…
A: I give the code in Java along with the output and code screenshots
Q: JAVA I cannot figure this one out no matter what I do I cannot get it to run. Please write it in a…
A: Your java program is given below as you required with an output.
Q: 1. A router receives a packet with destination address (222.186.114.16) Show how it finds the…
A: What is Network Address? => A network address is an identifier for a node or host on a…
Q: How does data visualization tools work?
A: Data visualization enables business users to gain insight into their vast amounts of data.Data…
Q: In a small store customers arrive at the rate 10 per hour and they stay in average 30 minutes. What…
A: Little's Law is the theorem that determines the average number of items in a queuing system, based…
Q: Memory (address space) is set aside at the start of program execution for the storage of variables,…
A: Answer: A linear data structure called a stack is used to store an ordered, linear series of items.…
Q: Explain how to examine a structure's member in C/C++.
A: Introduction: You can specify a structure (or union) type and a structure (or union) variable in the…
Q: Requirements: 1. Introduction. 2. Basic mechanism. 3. Application. 4. Blockchain important content.…
A: BLOCKCHAIN TECHNOLOGY 1. INTRODUCTION: Blockchain technology…
Q: 1. Find context-free grammars for the following languages: (a) L = a"b", n is even. (b) La"b", n is…
A: Introduction A formal grammar called context-free grammar is used to produce each potential string…
Q: 2. Find the ASM chart corresponding to the following description: There are two states, A and B. If…
A: ASM chart is a flow chart that consists of an interconnection of four basic types of elements. Such…
Q: Which of the following code snippets correctly traverses the contents of a linked list, from…
A: Answer the above question are as follows
Q: rk I need help on question 14.78. Please it's homework practice an
A: Dear Student, The complete source code, along with implementation and expected output is given below…
Q: Draw tree Step By Step Perform the following operations on an empty splay tree insert (3) , insert…
A: Splay trees can be described as the self-balancing or self-adjusted binary search trees.
Q: ncept three-way handshake. Use a maximum of thee sen- tences, illustrate if nee
A: Introduction: In reality, TCP gives us a trustworthy and secure connection between two devices. And…
Q: What will be the list after the following operations: a = [4, 2, 5] a.append(3)
A: Answer :
Q: f(p) = (5p+6) mod 26
A: The answer is
Q: hello for the MIPS instruction sltiu $s6,$s2,1432, show the immediate number, opcode, rs, and rt in…
A: Solution:- Given instruction:- sltiu $S6, $S2, 1432 Where $S6 is rt register and $S2 is rs register…
Q: Given the following definition of the TreeNode struct and data member of the BinarySearchTree class:…
A: Answer: We need to write the program for the cunt the number of nodes in the tree so we have taken…
Q: What is the purpose of the pooling layer in convolutional neural networks? Group of answer choices…
A: Correct Answer : Option ( A ) : To reduce model complexity
Q: Given the above linked list write the 2 methods below (removeDuplicates and showLL)
A: import java.util.HashSet; import java.util.Set; public class LLCycle_FE { public static void…
Q: Since the CPU's clock speed is printed and electricity cannot be altered, it is fixed at the…
A: How rapidly a computer's central processing unit (CPU) can receive and interpret instructions…
Q: C+++ HELP WITH MISSING CONSTRUCTOR Use a member initialization list to make the GamePoints'…
A: Use a member initialization list to make the GamePoints' constructor assign teamPanthers with 500…
Q: This means you need to make affordable, high-quality PCs. Is it possible to build a fast,…
A: Introduction: We have to design a system that is of the highest possible quality, with a suitable…
Q: at creates a dictionary containing twenty (only twenty) States of the United States and their State…
A: Dear Student, The source code, implementation and expected output of your program is given below -
Q: How does one determine how dependable a piece of software is and what metrics are used?
A: The dependability of the software product is measured using reliability measures. The kind of system…
Q: The connection between the central processing unit and the memory might be either a synchronous or…
A: Timer-controlled synchronous buses execute instructions in a certain order as the clock ticks. Each…
Q: You are given a dataset of various texts in English and their translation into German. You are…
A: correct answer is option b) Recurrent neural network (RNN)
Q: java program to CircularArrayQueue represents an array implementation of a queue in which the…
A: java program to CircularArrayQueue represents an array implementation of a queue in which the…
Q: Show an array of 6 integers that will give the minimum number of comparisons to sort the array, by…
A: Already, 5 of the 6 integers are sorted, implying that the final element must be inserted into the…
Q: Creating a class involves creating new instancesof objects defining class attributes changing values…
A: The solution is given below for the above given question:
Q: source program, a set of regular expressions source program, a set of tokens source program, a set…
A: Dear Student, The answer to your question is given below -
- OWrite a
program that reads data from a file containing integers that ends with -999.
- Output the numbers that are divisible by 7
- Output the numbers that are divisible by 11
- Output the numbers that are not divisible by 7 or 11.
Step by step
Solved in 3 steps with 1 images
- Python please: Given a text file named RandomTextFile.txt that contains newline characters, write a program that removes all the newline characters from the file. Your program should use the filename as input, and the output file should use the same filename as the original. Use the attached file RandomTextFile.txt to help you write and test your program. It contains the following text: Python is an interpreted language and the python interpreter is a computer program that executes code written in the python programming language. The python interactive interpreter is useful for simple operations or programs consisting of only a few lines. For more lines, a programmer can write Python code in a file, and then provide that file to the interpreter. For normal development a programmer installs python as an application on a local computer. Macintosh and Linux operating systems usually include python, while Windows does not. Programmers can download the latest version of python for free from…Python A Personal Fitness Tracker is a wearable device that tracks your physical activity, calories burned, heart rate, sleeping patterns, and so on. One common physical activity that most ofthese devices track is the number of steps you take each day The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and each line contains the number of steps taken during a day. Write a program that reads the file, then displays the average number of steps taken for each month Your program should use a function to calculatethe averagenumber of steps. You will need to pass more than one argument to the function.Python A Personal Fitness Tracker is a wearable device that tracks your physical activity, caloriesburned, heart rate, sleeping patterns, and so on. One common physical activity that most ofthese devices track is the number of steps you take each day. The file contains the number of steps a person has taken each day for a year.(Create a random step.txt file) Write a program that reads the file, then displays the average number of steps taken for each month.
- Write code that does the following: opens a file named MyName.txt, reads the first linefrom the file and displays it, and then closes the file.12 Digit Barcode In this homework, you will develop a python program which reads a series of barcodes from "barcodes.txt" and creates an output file "output.txt" which contains the barcodes and their status as seen in the example output below. 153182953420 5+1+2.5.4-1 7+3+8+4+3+2-3 1 23601057072 6+t-13 Even : 2+6+1 +5+0 = 14 Odd: 1+3+0+ 0 +7+7 = 18 3 x8 = 24 D+3- 10 4 + 4 = 8 10 -8 = 2 (CORRECT) What to submit: 1) ipynb file which contains checkBarcode function which takes a string varlable as input and returns true or false, and a driver program which reads in "barcodes.txt" and creates "output.txt". Assume the input file contains one barcode info per line. Important: Your input file name MUST BE "barcodes.txt" and the output file name MUST BE "output.txt". Otherwise, you'l get up to 30 pts penalty Below a sample output.txt: 123601057072 is a valid 10-digits barcode lab601057072 is an invalid 10-digits barcode 172601055072 is an invalid 10-digits barcode 12345 is an invalid 10-digits…Problem: Write a Python program that reads from an input file named employees.txt some employee information and produces a salaries report on screen. The input file employees.txt has a number of data lines. Each data line in the input file contains information about one employee including: first name, last name, job code (an integer between 1 and 4), and the number of days worked. The following is an example of what the input file employees.txt can contain: Ali Al-Harthi 22 Laila Al-Busaidi 4 25 Salim Al-Hajri Badria Al-Sinani 2 21s 19 Abir Al-Hinai 1 15 Your program should produce a salaries report on screen using the format shown below. Enter input file name: employee.txt Name Job Code Days Worked Salary (OMR) Ali Al-Harthi 3 22 660.000 Laila Al-Busaidi 4 25 637.500 Abir Al-Hinai 15 600.000 Number of faulty records = 2 Number of valid records = 3 Average salary = 632.500 The salary of each employee is equal to the number of days worked multiplied by the daily pay rate. The daily pay…
- Write a python program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file will hold. Write another program that reads the random numbers from the file, displays the numbers, then displays the following data: The total of the numbers The number of random numbers read from the file*Code in Python A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a file. The program should output the unique words and their frequencies in alphabetical order. Variations are to track sequences of two words and their frequencies, or n words and their frequencies. Below is an example file along with the program input and output: example.txt I AM SAM I AM SAM SAM I AM Enter the input file name: example.txt AM 3 I 3 SAM 3 The program should handle input files of varying length (lines).File Operations:Write a complete program that reads integers from a file called numbers.txt, and displays their sum on the screen. Example: If the content of numbers.txt is: 10 20 30 100 The program should print: 160
- C++ Create a program that reads a file containing a list of songs and prints the songs to the screen one at a time. After each song is printed, except for the last song, the program asks the user to press enter for more. After the last song, the program should say that this was the last song and quit. If there were no songs in the file to begin with, the program should say that there are no songs to show and quit. The program should begin by asking the user for the name of the input file. Each song consists of a title, artist, and year. In the file, each song is given on three consecutive lines. Create this program using a class Song.C-Programming Write a program that tells you how many words in a text file are unique (meaning the word only appears once in the text file). List of words in text file:…JAVA PPROGRAM Write a program that prompts the user to enter a file name, then opens the file in text mode and reads names. The file contains one name on each line. The program then compares each name with the name that is at the end of the file in a symmetrical position. For example if the file contains 10 names, the name #1 is compared with name #10, name #2 is compared with name #9, and so on. If you find matches you should print the name and the line numbers where the match was found. While entering the file name, the program should allow the user to type quit to exit the program. If the file with a given name does not exist, then display a message and allow the user to re-enter the file name. The file may contain up to 100 names. You can use an array or ArrayList object of your choosing, however you can only have one array or ArrayList. Input validation: a) If the file does not exist, then you should display a message "File 'somefile.txt' is not found." and allow the…