Assume you have a file on your disk named floatnumbers.txt containing float numbers. Write a Python code that reads all the numbers in the file and display their average. Your code must handle any IOError (for example, file does not exist) and ValueError (for example, alphanumeric data fo und in the filo Such as letters)
Q: Is it possible to tell the difference between hardware and software interrupts?
A: An interrupt is a signal from a device attached to a computer or from a program within the computer…
Q: Implement Hungarian Method for assignment problem that can solve an NxN matrix in python without…
A: Example: Given a 2D array, arr of size N*N where arr[i][j] denotes the cost to complete the jth job…
Q: Which normal form guarantees that a derivation tree will always be a binary tree?
A: The process of normalization involves removing duplication from a correlation or group of…
Q: Use lawful software and describe any issues that may arise
A: Introduction: Legal software is protected by copyright laws; the publisher may distribute only one…
Q: What is the acronym for personal computer?
A: Introduction: PC is an acronym for personal computer, a sort of technology that we use daily at…
Q: Consider the relation R (A, B, C) with an index on attribute A. a. Give an example of a query that…
A: The answer is as follows.
Q: What is the meaning of the phrase cursor?What is the meaning of the phrase cursor?
A: INTRODUCTION: Cursors are movable indicators that indicate the current position of any input on a…
Q: 1. A host receives an authenticated packet with the sequence number 181. The replay window spans…
A: Solution:- 1. Window spans from 200 to 263 (so window size is 64) The received packet has sequence…
Q: QI: A voice message of 2 kHz is sampled at DM system for a rate nine times the Nyquet rate. The…
A: Answer
Q: Do you know how old the original USB flash drive was?
A: Solution: Given, Do you know how old the original USB flash drive was?
Q: 7. Write a CC++ program that reads in a sequence of positive integers and prints out their BCD…
A: Here we can write the C++ program that reads in a sequence of positive integer and print out their…
Q: When is it necessary to apply whole disc encryption (WDE) and what are the benefits of doing so?
A: Please find the detailed explanation in the following steps.
Q: Which Macintosh machine was the first to be manufactured?
A: Introduction: An Apple Macintosh computer is a computer that runs on Apple's OS X operating system.…
Q: If you want to know how computers were obtained, utilised, and accounted for, explain the procedures…
A: The Answer is in step-2.
Q: What was the life narrative of Claude Shannon, and who was he?
A: What was the life narrative of Claude Shannon, and who was he?
Q: Using chainıng technique match values with attıliated buckets: 64,25,14,20,33,28,16, 35, 28, 8 Hash…
A: Ans: Using chainning technique match values with affiliated buckets : 64, 25, 14, 20, 33, 28, 16,…
Q: he student will do the following: • Analyze the system for potential security issues. • Identify…
A: Any unaddressed danger or weakness in your system that hackers may exploit to do harm to your…
Q: Create a C data structure for the internet subscriber. The "Subscriber" has the following member…
A: Use enum to represent a Plan information and a Subscriber will be a structure as mentioned and the…
Q: Create a program in Java that outputs ALL of the numbers whose digits add to 73 and which are…
A: 73 is not a composite number so it has only two factors, i.e. one and the number itself. The factors…
Q: Write a Java program to take a list of string from the user & print a list where each string has all…
A: Required:- Write a Java program to take a list of strings from the user & print a list where…
Q: Write and Run the Assembly language instructions to do the following: Write Assembly language…
A: Assembly Language: multiplication is repeated addition To multiply X*Y, initialize A=0, then add…
Q: four websites, including Microsoft, Oracle and Cisco's websites, that are all among the most popular…
A: Introduction: Websites dedicated to the most up-to-date information about the security. Microsoft…
Q: What implications may quantum computing have for computer programming?
A: Introduction: Quantum programming is the process of constructing sequences of instructions, dubbed…
Q: he tasks shown in the table late the Utilization he help of Gantt chart, prove that these tasks are…
A:
Q: Analyze and describe a fascinating data or text mining application
A: INTRODUCTION: Data mining is the practice of identifying patterns in massive data sets through…
Q: Create a C program with a structure and a union with the following membe char name[10] unsigned int…
A: Code: #include <stdio.h>#include<stdio.h>#include<string.h> struct st{ char…
Q: Computer Science You have been hired as a systems analyst to work with two other analysts. Your…
A: Name: apply for post office box Actors: user Description: For availing PO services user needs to…
Q: Who was the individual who was responsible for the invention of the motherboard?
A: Introduction: A motherboard is a piece of computer hardware used in personal computers that houses…
Q: Write a function that accepts a list of numbers as it's only arguments. The function will return the…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and 2 OUTPUT…
Q: Write a function in Computer Graphics using any Graphic Function. See the pic for the correct…
A: In this problem, we have to draw a spiral on the console. For creating such a shape in c++ we can…
Q: What effect did John von Neumann's educational background have on his subsequent mathematical…
A: Introduction: Set theory work paved the way for a career that spanned practically every major…
Q: When it comes to cyber crime, what is the conceptual framework? In your answer, please provide…
A: Introduction: Cyberspace, according to the internet theorists, allows for near-instant connections…
Q: 2. Fibonacci sequence is series of numerical terms where each term depends on two previous terms…
A: Solution: Given,
Q: Explain the type of casting in Java ! ( Prepare for assignment.. please explain briefly)
A: Here we define the casting in java and and explain the type of casting in java and attach the output…
Q: What exactly is a write buffer?
A: Introduction: A write buffer is a data buffer found in Intel's x86 and AMD64 CPU cache designs.
Q: Please write a program that performs Cipher Block Chaining encryption and decryption with either AES…
A: Solution: Given, Please write a program that performs Cipher Block Chaining encryption and…
Q: 1. Write a java program to create a linked list of Employees where each Employee node will contain…
A: Sun microsystems developed the Java language, which is primarily used for the applications which…
Q: Sketch HI-skew and LO-skew 4-input NAND and NOR gates. What are the logical efforts of each gate on…
A: ANSWER:-
Q: What was the year's greatest computer's name?
A: The Answer is in step-2.
Q: Assume EMB(w) is the word embedding for a word, w, computed using a standard word embedding…
A: Introduction: Word embeddings are a sort of word representation that allows for the depiction of…
Q: A computer program that your company has 25 licenses for has been copied onto 80 PCs. Describe a…
A: INTRODUCTION: There is a breach of professional ethics in this circumstance since license copies…
Q: What is file input and output and how do you execute file input and output in C programming?
A: An Input File always contains the last value stored to it.
Q: Write a program that: Gets a character array (C-string) using cin.g
A: Write a program that: Gets a character array (C-string) using cin.get to allow blanks in the…
Q: What do you know about the Meta Data Repository and where it is located in the DWH environment?…
A: Introduction: An Enterprise Data Warehouse (EDW) is another name for a Data Warehouse (DWH) (EDW). A…
Q: Decide whether the sentence is true or not true.. Fragmented industries are controlled by many…
A: Introduction: Fragmented industries traits We can categories the industry environment by industry…
Q: Discuss the generations of computers and explain how development has made them better.
A: Introduction What is generation of computers? As computers improved, humans began to keep track of…
Q: For the following polygon and ray, how many polygon intersections are encountered before arriving at…
A: Introduction: With the help of the scan line, a scan-based polygon rasterized algorithm is used to…
Q: What are the three kinds of data that a computer saves in its memory?
A: Introduction: Memory on a computer Memory refers to the temporary storing of data for processing in…
Q: Compare the three cloud computing delivery models: SaaS, PaaS, and IaaS. Discuss their security and…
A: Introduction: Actually, cloud computing is a relatively new information technology phenomenon that…
Q: 1) IEEE 754 Floating Point Standard: This standard is used to represent floating-point numbers (real…
A:
Step by step
Solved in 3 steps with 2 images
- Each of the following files in the Chapter.10 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, DebugTen01.cs will become FixedDebugTen01 .cs. a. DebugTen01.cs b. DebugTen02.cs c. DebugTen03.cs d. DebugTen04.csThis 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.C2- Write a Python program that reads the contents of a file named ‘Book.txt’ (you must write exception handling if the file doesn’t exist) The program should also determine and print the following: The number of words in the file The number of distinct words (without repetition) The number of uppercase letters in the file The number of lowercase letters in the file The number of digits in the file The number of whitespace characters in the file
- PLEASE COMMENT CODE In a python program, create a new file and call it “ tracking”. Write to it four lines each contains information about an order like this: 1-00654-021 Dell charger Toronto-WEST 99-49-ZAD011-76540-022 ASUS battery Milton-EAST 34-56-CBH561-09239-026 HP HD Scarborough-NORTH 12-98-AZC451-12349-029 Mac FD North York-LAWRENCE 34-49-ZWL01Add the file two more lines: 1-34567-055 Lenovo SSD Milton-ON 34-09-MT04 1-90432-091 Lenovo battery Oakville-ON 78-KL98 Define a function that searches for a brand (e.g. Dell, ASUS, etc.). Test the function in your program.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.In python: The file contain the content in the form pet1,pet2,pet3 Output will return [[‘pet1’, ‘pet2’, ‘pet3’],[‘pet1’, ‘pet2’, ‘pet3’],…] or none if wrong format for example : PET.txt Cat, Dog, Turtle Hamster, Dog, Dog, , Turtle PETS = read_file(‘PET.txt’) len(PETS) Output: 3 PETS[1] Output: [‘Hamster’, ‘Dog’, None] PETS[2] Output:['Dog', None, 'Turtle'] Play.txt Hamster, Fish Crocodile Play = read_file("Play.txt") print (Play) Output : None
- Using the input file of integers named randomNumbers.txt found in Module 6, write a Python program that will read this input file and display the numbers that are multiples of a given value by the user. In addition to the above, be sure your code handles the following exceptions: any IOError exception that is thrown when the file is opened and data is read from it ValueError exception when the items read from the file are converted to an integer. Be sure to: use functions throughout. The function main should only call functions in the order needed. keep the functions modular and performing only one task. add a beginning and ending statement so the user will know when the program begins and ends. comment throughout the code. no global variables! be sure to read until end of file the program should look for the file in the current directory. contents of randomnumbers.txt: 38- 860- 724742- 530779317- 36191843289- 10741943265649- 447806891730371- 3517102394- 549630In Python Write a program that consists of (at least) two function: A function that creates and saves data in a file. The saved data represents exam grades. In the function, you will create n random numbers in the range [0,100], where n is the number of students. The function can be called as follows: createFile(filename, n) Main function, in which the user inputs the file name and the number of students, then the main calls function createFile. The main should perform validation for n (should be > 0), and the filename (should end with .txt). I will explain how to validate strings in the coming lecture. Hint: a good developer will write four functions to solve the problem.Java Problem The teacher at a school needs help grading an exam with a number of True/False questions. The students’ IDs and test answers are stored in a file. The first entry of the file contains the answer to the test in the form: TTFTFTTTFTFTFFTTFTTF Every other entry in the file is the student’s ID, followed by a blank, followed by the students’ response. For instance, the entry: ABC54102 T FTFTFTTTFTTFTTF TF The student’s ID is ABC54102, answer to question 1 is True, the answer to question 3 is False. Also, the student did not answer question 2 and question 18. The exam has 20 questions. Here is the grading policy: each correct answer is awarded two points, each wrong answer get -1 point, and no answer gets 0 point. Write a program that processes the test data. The output should be the student’s ID, followed by the answers, followed by the test score (total points), followed by the test grade. Assume the following grade scale will be used: 90%-100%, A; 80%-89.99%, B; 70%-79.99%,…
- If you have downloaded the source code from this book’s companion Web site, you will find a file named text.txt in the Chapter 08 folder. Write a program that reads the file’s contents and determines the following:• The number of uppercase letters in the file• The number of lowercase letters in the file• The number of digits in the file• The number of whitespace characters in the filePHONE DIRECTORYDescription: Create a phonebook directory that will store the contact numbers of N persons. Your program should allow the user to add, view, delete, and update the contacts in the phonebook. Note that one person can have multiple contact numbers. The program will stop when the user command is ‘X’. Program command and entry should not be case-sensitive. That means commands ‘I’ or ‘i’ and the name “Jacky” or “JACKY” are the same. Each contact number can be 7 digits or 11 digits only. The user should input a string containing the command, name, and contact number(s) (Limit the contact number of each person to three). This string should be broken down into fields in order to separate the different values and store them in their appropriate variables. Use linked list in the implementation. Your node must declare at least four instance variables. Program flow: Command> I Jacky 09211234567 Remarks: New contact has been added. Command> V Jacky Contact…Task: Loading data from files This exercise will require you to load some information from files and use it in your program. scene.txt contains a description of a series of shapes and colours to draw. You need to write code to read in the file data and draw the requested shapes in the correct colour. Each line in scene.txt will contain one of the following starting keywords followed by some data: COLOUR followed by 3 values: R, G, B CIRCLE followed by 3 values: X, Y, RADIUS RECT Followed by 4 values: X, Y, W, H LINE Followed by 4 values: X1, Y1, X2, Y2 CIRCLES are defined from the center. RECT's are defined from the top left. All values are space separated, and you can assume all input is correct (no errors). Please solve this program to draw the scene. I can't upload the file scene.txt, so I decide to screenshot a file for you. Subject: Java Programming