Example Implementation (input in red): Loading word list from file... 55900 words loaded. Welcome to Hangman Ultimate Edition Do you want to Play (p) view the leaderboard (1) or quit (q): p Score Name 7 Matthew Howell 5 Herbert Daly Hiran Patel 3 Would you like to play (p) or view the leaderboard (1): p What is your name: Matthew Howell I am thinking of a word that is 2 letters long You have 6 guesses left. Available letters: abcdefghijklmnopqrstuvwxyz Please guess a letter: a Good guess: a_ --- You have 6 guesses left. Availahle letters : hcdefahiiklmnong
Q: Make a copy of your program for the problem Geography Grades 2 and change the code in such a way…
A: Code as,
Q: Example Implementation (input in red): Loading word list from file... 55900 words loaded. Welcome to…
A: ANSWER: I have done code and furthermore I have joined code just as code screen capture. Code: def…
Q: Read the txt file in Python and display the output in a separate txt file as shown below; Input txt…
A: file1 = open("bartlleby10.txt") r=file1.read()l1=[]l2=[]c=0for i in r.split("\n"): b=i.split()…
Q: Any help with this question is greatly appreciated!! Thank you!! 1. For this question please…
A: x = 5y = 2r = x % yprint (‘Remainder is:’, r) Explanation: In the above example x = 5 , y =2 so…
Q: Write a Python program to input user’s name and how many people are in the dinner party tonight
A: Python code: name=input("Enter name") n=int(input("Enter how many people are in the dinner party…
Q: This question concerns the use of a book cypher to encode a message. Write a program called…
A: A Python program is as follows, File name: “bookcypher.py” def main(): #Get input file name…
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for…
A: Here I have declared 2 variables and taken input from the user for the values of these 2 variables.…
Q: Qingshan recommends that she and her companion Daniel go climbing. Shockingly, they are occupied…
A: Here have to determine about the companion Daniel go climbing programming problem statement.
Q: A1 The input file A1(input).txt has the following content for example: [a,b], [12, 'y']['1', 2, ¹2…
A: Program: import refile_obj = open("C:/Users/ketan/Desktop/A1.txt", "r")word_list_file=…
Q: Sites like Zillow get input about house prices froma database and provide nice summaries for…
A: current_price = int(input())last_months_price = int(input()) print(f"This house is ${current_price}.…
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: import java.util.Scanner; public class LabProgram { public static void main(String[] args) {…
Q: You will have an orthogonal triangle input from a file and you need to find the maximum sum of the…
A: Please give positive ratings for my efforts. Thanks. ANSWER using System;using…
Q: Próblém B. Comparator Input file: Output file: standard input standard output 2 seconds Time limit:…
A: Code: #include <iostream>using namespace std;int main(){ //declaring required variables…
Q: Design a python program that reads a file named "scores.txt containing lines of test scores…
A: f = open('scores.txt','r')#opening text file in read mode#now reading contents of the file line by…
Q: Write a Python program to search a specific item in a singly linked list and return true if the item…
A: 4. Write a Python program to search a specific item in a singly linked list and return true if the…
Q: Explain the difference between a script file and a function file
A: NOTE : Answering only first question as per the rules. Script file and a function file is generated…
Q: an orthogonal triangle input from a file and you need to find the maximum sum of the numbers…
A: the code is an given below : Below is code for the asssignment given. You can read input from file…
Q: NEED HELP PLEASE! Write a Java program to read a text file (command line input for file name),…
A: import java.io.*; public class Test{ public static void main(String[] args) throws IOException {…
Q: Scrabble is a word game in which words are constructed from letter tiles, each letter tile…
A: Given dictionary is tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4,…
Q: Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the…
A: Answer is given below .
Q: Example Implementation (input in red): code in python 3 Loading word list from file... 55900 words…
A:
Q: Write a C++ program to sum the values in the file with respect to the input of the user. The file…
A:
Q: Define the variable x as c = 4.6, d = 1.7, a = cd², a = then evaluate: c-d (f) x = ed-b + ³√√c +…
A: >> c=4.6; d=1.7;>> a=c*d^2;>> b=(c+a)/(c-d);>> % Part (a)>>…
Q: Use python Write your answers in the text entry and submit the assignment. Given: items = ["mask",…
A: In Python, the append() method is used to adds an item to the end of the list. The added item is…
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: import java.util.Scanner;public class LabProgram{ public static void main(String[] args) { int…
Q: Example Implementation (input in red): Loading word list from file... 55900 words loaded. Welcome to…
A:
Q: Write a complete C or C++ program to implement a digital music archive program. The program should…
A: /* This is a C++ program to implement a digital music achieve…
Q: Python Write a program that first reads in the name of an input file and then reads the file using…
A: #here is my python program import csv #imported the csvd={}# dictionary declaration with…
Q: The result of COM101 exam results are given in Grades.txt. Write a C program that reads student ids…
A: C - program reads an input text file called "Grades.txt" .The input text file contains the student…
Q: You will have an orthogonal triangle input from a file and you need to find the maximum sum of the…
A: As programming language is not mentioned we are providing you answer in C#
Q: Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured…
A: #include<iostream>#include <fstream>using namespace std;// Size of given matrix is M X…
Q: OddEven Write a C++ program to sum the values in the file with respect to the input of the user. The…
A:
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for…
A: Given the source code Take the input of house prices And compute monthly mortgage.
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for…
A: Here I have corrected the code in the Java programing language so the expected output is viewed. I…
Q: Write the assembly code that reads string from "input.txt" file and check whether the readed string…
A: Given that Write an assembly program to check whether a given string is palindrome or not.…
Q: Write python code ? correct code bcz before i got it was not running properly Write a function…
A: I have provided TXT FILE SCREENSHOT, PYTHON CODE, CODE SCREENSHOT and OUTPUT…
Q: import random def heads_or_tails(n): i=0 n = 'n' while i…
A: In the above program n, an integer value, is passed as function parameter. Inside the function you…
Q: You will have an orthogonal triangle input from a file and you need to find the maximum sum of the…
A: Program Plan: Define checkPrime() function to check whether a number is a prime number or not.…
Q: C++ Implement a standard trie for a set of ASCII strings including a terminating character $ for…
A: ALGORITHM: Step 1: First define the character size as 128 and create a class TrieNode to store the…
Q: Consider a file log.txt. Each line contain a log output from a certain mail application. From:…
A: Since no language is given in the question we are doing the program in python programming language
Q: I am think a word that is 2 letters long What is your name: Matthew Howel1 Would li ke to play (p)…
A:
Q: PYTHON QUESTION 3 MULTIPLE CHOICE years = [] with open("years.txt") as file: for line in…
A: Given Code: years = [] with open("years.txt") as file: for line in file: line =…
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: You will have an orthogonal triangle input from a file and you need to find the maximum sum of the…
A: Code execution:
Q: 2. Write a program that will initially create a SORTED list containing the following and then run…
A: The answer is given below:-
Q: 1. Write a program that reads two strings from the keyboard using a while loop A.Terminate the loop…
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Q: 1. Wr1te a Prolog program that finds the maximum of a list of numbers. Don't use any available…
A: Program : domains list_of_numbers = integer* maximum_number = integer predicates…
Q: Problem Suppose at the end of the semester, there is a file "scores.dat" recording scores each…
A: #include <iostream> #include <fstream> using namespace std; #define MAX 30 struct grades…
Q: Write code for below problem. The input below is just an example and you should implement…
A: Given: You will have an orthogonal triangle input from a file and you need to find the maximum sum…
Q: You will have an orthogonal triangle input from a file and you need to find the maximum sum of the…
A: I have provided solution in step2
code this output in python3.
Step by step
Solved in 4 steps with 6 images
- Question 9 sis please how do I search for a given set of string in a large text file ,replace it with another word and write my outputs into different text files in python. please I want a python code example for the above question. Please solve all parts and Full explain this question and text typing work only thanks.Please answer in Python (no imports, no list comprehensions) Given a file with an encoded message and the parameter skip (as a positive integer), parse through it line by line and return a decoded version of the file in one string, with each decoded message in a new line. Don’t remove the extra empty line (last line) from the output string. Then, skip through lines based on the 'slip' parameter that will tell you how many lines to skip through as you parse through the file. Return the string with only the required information after 'skip'. while decoding, ignore:all exclamation points (!), question marks (?), semicolons (;), dollar signs ($) and any whitespaces. (example): if input has 6 lines and skip = 1, output will keep line 1, skip line 2, keep line 3, skip line 4, etc. If skip = 2 then output will keep line 1, skip lines 2 and 3, keep line 4, etc.can you make it so it reads from the kongcrew.txt file instead of typing out the info? can you also make it where it lists all of the specifications with the information below like the bolded texted in the picture? example below Name Sit Walk Swing ....... and so on with the info below (make one print out before adding the second ss and after so it shows the updated info of how many bananas the monkeys have before and after) the txt file information is below. Donkey Kong Y Y Y N 3 3 1981 Donkey Cranky Kong Y Y N Y 1 0 1985 Donkey Dixie Kong Y Y N Y 2 2 2001 Dixie Kiddy Kong Y N Y N 1 1 2003 Dixie Wrinkly Kong N N Y Y 1 2 1985 Donkey Tiny Kong N N Y Y 2 1 2001 Dixie Diddy Kong Y Y Y N 3 2 1985 Donkey Uncle Kong Y N Y N 1 2 1990 Donkey Chunky Kong N Y Y Y 2 5 2007 Dixie
- This question concerns the use of a book cypher to encode a message.Write a program called ‘bookcypher.py’ that accepts:1. The file name for a Project Gutenberg book text.2. A message that is to be encoded.3. A file name for output of the encoded version of the message.The program will create an encoded version of the message by replacing its words with the locationsof words in the book.Say, for example, the message is ‘meet me at the usual time and place’, and the Gutenberg text is‘The Importance of Being Earnest’ by Oscar Wilde.• There is an occurrence of ‘meet’ as the 5th word on the 493rd line of the book text.• There is an occurrence of ‘me’ as the 9th word on the 190th line of the text.• There is an occurrence of ‘at’ as the 6th word on the 8th line of the text.• And so on.Representing a word position as a conjunction of the line number and the index of the word withinthe line, we can encode the message as 493-5, 190-9, 8-6, etc.Sample I/O (user input in bold):Enter the book…For every programming exercise (Part II) you are to turn in: a single source code file/ or two separated code files for each problem a single file containing the outputs of several test runs (screenshots) of the program demonstrating that the program works in all reasonable cases. Part II: programming exercises 1. Wr1te a Prolog program that finds the maximum of a list of numbers. Don't use any available library or functions. For example: findmax([5, 2, 4, 3], Elm). then return Elm=5 2. Write a Prolog program that returns a list containing the union of the elements of two given lists. Don't use any available library or functions. For example: union([1, 2, 3], [3, 4, 5], Lis). then return Lis=[1, 2, 3, 4, 5]you will be identifying which organisms are the tastiest. The tastiest organisms are the ones that appear the most times as a food source. For example if aquatic.txt was the input file, file_list will be: ["Bird,Prawn,Mussels,Crab,Limpets,Whelk\n", "Crab,Mussels,Limpets\n", "Fish,Prawn\n", "Limpets,Seaweed\n", "Lobster,Crab,Mussels,Limpets,Whelk\n", "Mussels,Phytoplankton,Zooplankton\n", "Prawn,Zooplankton\n", "Whelk,Limpets,Mussels\n", "Zooplankton,Phytoplankton"] Limpets and mussels appear the most times as a food source, making them the tastiest organisms. Here is a sample output using aquatic.txt: Enter the food web file name: aquatic.txt Predators and Prey: Bird eats Crab, Limpets, Mussels, Prawn, and Whelk Crab eats Limpets and Mussels Fish eats Prawn Limpets eats Seaweed Lobster eats Crab, Limpets, Mussels, and Whelk Mussels eats Phytoplankton and Zooplankton Prawn eats Zooplankton Whelk eats Limpets and Mussels Zooplankton eats Phytoplankton Apex Predators:…
- Write code for below problem. The input below is just an example and you should implement independent from the input. 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 an address book program that stores your contacts' names and their email addresses. The names and email addresses are originally stored in a file called phonebook.in, in the format: Harry Potter t..d@hogwarts.edu Hermione Granger b..h@hogwarts.edu Ron Weasley r..b@hogwarts.edu Draco Malfoy m..s@hogwarts.edu Severus Snape h..e@hogwarts.edu Albus Dumbledore a..x@hogwarts.edu Your program should read from the file, storing the names and corresponding email addresses in a dictionary as key-value pairs. Then, the program should display a menu that lets the user enter the numbers 1 through 5, each corresponding to a different menu item: 1) look up an email address 2) add a new name and email address 3) change an email address 4) delete a name and email address 5) save address book and exit When the user enters 1, the program should prompt them for a name, and then print the corresponding email address. If there is no dictionary entry under that name, the program should print, "Sorry,…In python, create a word ladder using breadth fist search. The program should open a file that contains more than 10000 that are the legal words to build the ladder. You will have a first word and an end word that would be in a file that the program should read. Simply, from a given starting word, find the shortest "ladder" of single letter changes which leads to some final word, where each intermediate state is also a word. For example: clash, flash, flask, flack, flock, clock, crock, crook, croon, crown, clown. As you might infer from the example above, there is no simple algorithm that generates a word ladder. Rather, you have to search for a ladder by generating all of the possibilities. Doing so will give you an opportunity to use Python data structures like lists, sets and dictionaries. Your program should first read in a file with 10000 words giving it a large collection of words to work with. All of the examples in the tests that your program will be given will be of…
- Applying object oriented programming, do a python program that will determine the required mass of one compound based on three parameters: (1) compound name, (2) liters of solution, and (3) molarity. The input should be in a single text file (input.txt). The required mass should be in a single text file (output.txt). Only two decimal places should be included in the output.txt. Example: *input.txt* compound,liter,molarity NH4Cl, 0.1, 2.5 NaCl, 0.5, 0.25 Na2CO3, 0.75, 1.25 *output.txt* 13.37 7.31 99.36sing good OOP, write a C++ program that will read an input file to manage a list of students waiting to register for a ourse using a linked list. The input file name is WaitList.txt and is located in the current directory of the project. The file layout is as follows: action student name Actions are defined as follows: 1 - add student name to the end of the linked list2 - add student name to the beginning of the linked list3 - delete the student at the beginning of the linked list4 - delete the student at the end of the linked list Actions #1 and #2 require student names. Actions #3 and #4 do not. For example, if the input file contents contained: 1 Sally Sue Student1 Peter Pupil1 Sam Scholar42 Terri Tutor1 Abby Achiever32 Bill Brain The program would display the wait list as follows: The Wait List: 1. Bill Brain2. Sally Sue Student3. Peter Pupil4. Abby Achiever End of List. Then the program will prompt the user if they wish to delete a student by name. If…Write a program to read several lines from a file. For each line, check (recursively) whether it is a palindrome. If it is a palindrome output the original string preceded by an integer (a counter) , like this: 1 : Sore was I, ere I saw Eros.2 : A man, a plan, a canal -- Panama Recall that a palindrome is a String that is the same backwards and forwards. Some examples of single words that are palindromes are: level, madam, racecar Phrases can also be palindromes if you strip out all the whitespace and punctuation and make everything the same case. Some examples are: Madam, I'm Adam A Toyota's a Toyota (See the palindrome video for more) You will need one method to eliminate whitespace and punctuation , make everything lowercase, and return the new string. Use the recursive method you wrote in L15Num2. This returns a string with no whitespace or punctuation, but not all the same case. Then (in main) convert that string to lowercase. You need a recursive method that takes the new…