Rewrite the % filter which makes a text file for the names "dog, cat and mouse" (ie: dog.txt, cat.txt, mouse.txt) as a filter function. please answer in powershell
Q: Ensure that the loop displays values from 50 to 40 in multiples of 3 (i.e. 50, 47, 44, 41). for (int…
A: The complete code is given below:
Q: The output shall: 5.1. Ask three (3) of your classmates to enter their student number (key) and…
A: Initially I am saving python script with name "student_list.py". In the process a list is used to…
Q: Write the following functions that fill a rectangle with the specified color, center, width, and…
A: The function def drawRectangle(color = "black",x=0, y=0, width = 30, height = 30) is shown below.…
Q: Review the following program: import urllib.request, urllib.parse, urllib.error fhand =…
A: Using urllib you can treat a web page much like a file. You simply indicate which web page you…
Q: .Write code for below problem. The input below is just an example and you should implement…
A: Given: We have to write a C++ program in the given statements of the above questions.
Q: What does the StreamReader class’s ReadLine method return when it reads a blank line?
A: Given: What does the StreamReader class’s ReadLine method return when it reads a blank line?…
Q: v Question Completion Status: QUESTION 10 Analyze the following code and select the right print…
A: Analyze the following code and select the right print result SingleLinkedList<String>…
Q: Modify ccurve.py by changing the background color to yellow, and curve color to red Code: """…
A: The Complete code is given below with the output.
Q: QUESTION 5 The function getline(cin, stringVar) gets all remaining text on the current input line,…
A: In this, we are asked to solve only question 5 Question 5) In C++ getline is a way to take input a…
Q: in coral languge Write a program that first gets a list of 5 integers from input. Then, get another…
A: Actually, program is a executable program that runs on a computer.
Q: Write Complete Code Fragments in space below. Remember your code should be well documented. The…
A: Programming language is missing in the question. So we will answer this program in C++ language. If…
Q: Write programs to do the 2 variations on the Bubble Sort. Comment the first variation completely.…
A: NOTE: - Both variations of Bubble Sort are explained and implemented in python 3 in the next steps.…
Q: Write code that inserts userltem into the output string stream itemsOSS until the user enters…
A: import java.util.Scanner;import java.io.PrintWriter;import java.io.StringWriter;public class…
Q: End of semester grades are quickly approaching and some nice guy hacker wants to write a function…
A: Solution: Given, End of semester grades are quickly approaching and some nice guy hacker wants to…
Q: Create a definition for the object that will be known as StreamWriter.
A: Overview: System.io is a namespace used in C# programming that has classes for various tasks…
Q: Ensure that the loop displays values from 50 to 40 in multiples of 3 (i.e. 50, 47, 44, 41). for (int…
A: In this question we have to write a C# program where we have to write a loop to display values from…
Q: Hello ! Would look whats wrong with my program. When I add a contact the others names which they are…
A: To find: When I add a contact the names of the others which are in the Txt file be deleted and I…
Q: You are given a menu from Starbucks in comma separated format, "menu.csv". Write a program that…
A: Python used to answer this question
Q: Consider the code presented below and select the correct output for this code: my_dict =…
A: Given python code is, my_dict={'shoes':10.5, 't-shirt':'XL', 'pants':'34-36'}…
Q: Given the following words on separate lines in a file named wordlist: cat dog concatenate dogma…
A: We need to find the regular expressions used with grep to return the words: cat and category.
Q: Write code that inserts userItem into the output string stream itemsOSS until the user enters…
A: Java Code: import java.io.PrintWriter; import java.io.StringWriter; import java.util.Scanner;…
Q: Use the python CSV module's csv.DictReader() approach to read the data from the file. Read the…
A: The programming language Scheme is multi-paradigm. It's a Lisp dialect that allows you to write in…
Q: Which one of the following data types can we NOT loop through? A) list B) string C) float D)…
A: A data type is an attribute of data which tells the compiler or interpreter how the programmer…
Q: Ensure that the loop displays values from 50 to 40 in multiples of 3 (i.e. 50, 47, 44, 41). for (int…
A:
Q: kees Giants Cardinals Tigers Yankees Yankees Yankees Yankees Reds Yankees Cardinals Yankees…
A: the code is an given below :
Q: Before using the ReadLine function on a StreamReader object, it's important to make sure the…
A: Given: It is critical to verify the EndOfStream property of a Stream Reader object before invoking…
Q: How many functions lines errors are in the following ?code }()viod loop ;(int pot=analogread(AO (int…
A: In the above-given question, we can see the functions which are of errors so the answer for it is…
Q: Which of the following situations will lead to an object being aliased? Select all that apply. O…
A: Database Management System(DBMS) is a software for storing and retrieving users data while…
Q: Create a test file with a paragraph containing more than 20 lowered sentences. Read the filr,…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it…
Q: SO I NEED INPUTTING THIS FILE FOR THE OUTPUT TO BE THE SAME AS THE INCLUDED DOCUMENT. I POSTED THE…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Write a C++ program to handle the Input Mismatch Exception.
A: We can use Try catch statements for exception handling. If the input provided is Not a Number which…
Q: PYHTON: Write a method to read the test.txt file, and return the lines from [0 to 5].
A: Python used to answer this question
Q: Would look whats wrong with my program. When I add a contact the others names which they are in the…
A: The problem in your code is that, you have to open file in write mode therefore, when you add a…
Q: In a document file, write a program that will execute a string functions based on what the user…
A: The program uses a switch-case statement to implement different choices of string manipulation…
Q: Mark the following statements as true or false 1- The extraction operator => skips all leading…
A: 1- The extraction operator => skips all leading whitespace characters when searching for thenext…
Q: method can be used to validate user's input of a text field against the expression (/^[A-Za-z]+$/).…
A: The alert() method is used to display an alert box that is used to ensure that the information comes…
Q: Given 4 numbers (passed in as parameters) write a function that returns the average of these numbers…
A: We will write a simple code for solving the given problem.
Q: What type of error exists in the NATLAB code snippet below? function avg = findAverage(x, y, z) %…
A: Syntax errors are the rules and prototypes that are to be followed for sake of smooth compilation of…
Q: Write a program that reads all words from a file and saves them in a data structure. Then, it prints…
A: The idea is to use the concept of File Handling and a text file(say file.txt) that contains all the…
Q: Consider a CSV file contains information about COVID-19 status of Bangladesh. The head "Date",…
A: Create the data.csv in the current working directory 18/6/2021,DHK,345,19518/6/2021,BOG,…
Q: adjMat = [] adjrow = [] n=rest.split("\n") a=[] for i in n: a.append (i.split(" ")) for i in a:…
A: The solution for the above gvien question is given below:
Q: What is the difference between declaring a header file with and ” “?
A: Introduction: The declarations are made in a header file, and then the #include directive is used in…
Q: Write a program that opens a specified text file and then displays a list of all the unique words…
A: Programming language is missing in the question. So we will answer this program in Python. If you…
Q: Which of the following situations will lead to an object being aliased? Select all that apply. O…
A: About Aliased:it is used whenever one variable valve is assigned to another variable.not same as…
Q: Please read the square length from a file called "filelnput.txt" then calculate the square area and…
A: A C programming language provides a file handling mechanism in which open files in different modes…
Q: change the code to do the same purpose and same output :
A: #include<iostream>#include<fstream>#include<string> using namespace std; void…
Q: I have a dataset numbers=load('mytextfile') Output numbers = struct with fields: train0:…
A: clear;load mnistdata; figure(1)n = 6;for i = 1:n*n digit = train8(i,:); %digit = test8(i,:);…
Rewrite the % filter which makes a text file for the names "dog, cat and mouse" (ie: dog.txt, cat.txt, mouse.txt) as a filter function.
please answer in powershell
Step by step
Solved in 2 steps with 3 images
- .Write code for below problem. The input below is just an example and you should implement independent from the input. Please paste the link to the answer shared using pastebin, dotnetfiddle, jsfiddle, or any other similar web-site. 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 *69 85*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…The python function first_words takes one parameter, fname, the name of a text file, and returns a list containing the first word from each line of the file. For example, if the file contents are: apples are red bananas are yellow limes are green then the list ["apples", "bananas", "limes"] should be returned.NOTE: You may assume the file will contain no blank lines.BIG HINT: If line is a string representing a line of text (inside of a for loop!), then L = line.split() creates a list of the words in the line.File names: color_square.py, chessboard.py, test_squares.py Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image below. You will provide the functions that allow us to determine: if a chessboard square is either black or white, given its coordinates. If the row/column is valid or not for the standard chessboard For example, if we pass in “d” for the column and 4 for the row, your function that determines color should return the string: “BLACK”. If we pass in "k" for the column to your function that validates columns, that function should return the boolean False. Requirements: Your function for validating the column should be able to accept upper or lowercase strings as parameters. Your functions for validating the row should be able to accept integers or strings as parameters. Your function that determines black-or-white may assume that the input has been validated prior to us calling…
- BASH FLOW CHART: Create a flow chart to describe an algorithm that takes a text file with format ID,FirstName,Last Name,Street,City and appends a user ID field consisting of a C followed by theemployee ID. For example, the first entries in Lab 2's employees.txt are:0,Douglas L,Eberhard,Addenda Circle,Cornwall1,Elizabeth Sua,Hemauer,Wyatt Way,Peterborough2,Bailey Rae,Lopez,Turnagain Street,Sault Ste. MarieAfter processing, the entries should be:0,Douglas L,Eberhard,Addenda Circle,Cornwall,C01,Elizabeth Sua,Hemauer,Wyatt Way,Peterborough,C12,Bailey Rae,Lopez,Turnagain Street,Sault Ste. Marie,C2In Python Write a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator ('|') in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Ex: If the input of the program is: movies.csv and the contents…Create a list of 5 words, phrases and company names commonly found in phishing messages. Assign a point value to each based on your estimate of its likelihood to be in a phishing message (e.g., one point if it's something likely, two points if modereratly, or three points if highly likely). Write an application that scans a file of text for these terms and phrases. For each occurance of a keyword or phrase within the text file, add the assigned point value to the total points for the number of occurences and the point total. Show the point total for the entire message. (Write the program in Java)
- In c++, Using STL containers, components, and algorithms show all data from the text file movies.txt. Please make sure the list updates once the user adds a new movie to the text file. Console Movies program COMMAND MENU show - user is able to see all available movies from movies.txt command: show The Adventures of a Babysitter $10 Barney $25 Larry the Car Man $15 Dora and the missing map $15 Ceasar and the Lunch Lady $10 Suzie and the Bad Kids $13.95 command: add cout << "What movie do you want to add?"; cin >> BeeHive $12; cout << "Movie added"; command:show The Adventures of a Babysitter $10 Barney $25 Larry the Car Man $15 Dora and the missing map $15 Ceasar and the Lunch Lady $10 Suzie and the Bad Kids $13.95 Beehive $12 movies.txt with all possible movies: The Adventures of a Babysitter $10 Barney $25 Larry the Car Man $15 Dora and the missing map $15 Ceasar and the Lunch Lady $10 Suzie and the Bad Kids $13.95JavaScript Loops Create an HTML document called assignment2.html that implements a webpage that dynamically creates (using JavaScript code) a 15X15 HTML table and displays in each cell the (row, column) information for that cell. Allow the user to select the number of rows and columns to redraw a new table. Follow these guidelines to implement your assignment: 1. Create a JavaScript file called assignment2.js and write the code for a function that draws the table. 2. Invoke the function when the visitor clicks on the assignment2.html page. 3. Load the assignment2.js file at the end of the body in assignment2.html. 4. ( 10% of the grade ) Accept user input for the number of rows and columns in the table. 5. ( 10% of the grade ) Use good web design practices to enhance visually your html page. Add a title, picture, colors, copyright line, etc.//18. refreshPosts//a. Dependencies: removeButtonListeners, deleteChildElements, displayPosts,//addButtonListeners//b. Is an async function//c. Receives posts JSON data as a parameter//d. Call removeButtonListeners//e. Result of removeButtonListeners is the buttons returned from this function//f. Call deleteChildElements with the main element passed in as the parameter//g. Result of deleteChildElements is the return of the main element//h. Passes posts JSON data to displayPosts and awaits completion//i. Result of displayPosts is a document fragment//j. Call addButtonListeners//k. Result of addButtonListeners is the buttons returned from this function//l. Return an array of the results from the functions called: [removeButtons, main,//fragment, addButtons] Still fails help please const refreshPosts = async (posts) => { if (!posts){ return undefined; } let buttons = removeButtonListeners(); let myMain = deleteChildElements(document.querySelector("main")); let…
- >> classicVinyls.cpp For the following program, you will use the text file called “vinyls.txt” attached to this assignment. The file stores information about a collection of classic vinyls. The records in the file are like the ones on the following sample: Led_Zeppelin Led_Zeppelin 1969 1000.00 The_Prettiest_Star David_Bowie 1973 2000.00 Speedway Elvis_Presley 1968 5000.00 Spirit_in_the_Night Bruce_Springsteen 1973 5000.00 … Write a declaration for a structure named vinylRec that is to be used to store the records for the classic collection system. The fields in the record should include a title (string), an artist (string), the yearReleased (int), and an estimatedPrice(double). Create the following…Octave assignment 1-Introduction to Octave Introduction This assignment is meant to be a gentle introduction to Octave, the free version of Matlab. It assumes that you have no prior coding experience. Objectives Download Octave and run it or use https://octave-online.net/ Learn the basics of the Octave GUI. • Learn how to create a short executable file called an m-file (.m extension) and run it. • Learn what a data type is. • Learn how to declare variables of different data types. • Learn how to create matrices. • Learn how to use several of Octave’s functions for creating objects with random numbers. Instructions 1.) Create a file call it with the form exercise_1_first name_last name. Include the underscores in your file name. At the top of the file add the comment "“My first Octave assignment. I'm so excited, I just can't hide it." 2.) Create the following variables a = 2.3; b = -87.3; A = [1,2; 4,5]; Create a matrix 2 × 2 B using the rand() function. Create two random complex…This question comes from the textbook:Starting out with Visual C# 5th Edition - Chapter 14 Programming Problem 2 Create an application that reads the contents of two text files and uses LINQ extension methods to perform the following: • It should display a list of all the unique words contained in both files.• It should display a list of the words that appear in both files.• It should display a list of the words that appear in the first file but not the second.• It should display a list of the words that appear in the second file but not the first.• It should display a list of the words that appear in either the first or second file but not both. Hint: Use set operations to perform these analyses. Also, see Chapter 8 for a discussion of string tokenizing.