1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lera25 [3.4K]
2 years ago
7

Write a program that reads a file called 'test.txt' and prints out the contents on the screen after removing all spaces and newl

ines. Punctuations will be preserved. For example, if 'test.txt' contains: This is a test file, for chapter 06. This a new line in the file! Then, your program's output will show: Thisisatestfile,forchapter06.Thisanewlineinthefile! Hint: Consider using the 'strip()' and 'replace()' functions.
Computers and Technology
1 answer:
svp [43]2 years ago
8 0

Answer:

I don't know  you should figure that out good luck

Explanation:

good luck

You might be interested in
Description:
Nastasia [14]

Answer:

The programming language is not stated (I'll answer using C++)

#include <iostream>

using namespace std;

int convert(float miles)

{

   return miles * 5280;

}

int main() {

   cout<<"Console:"<<endl;

   cout<<"Hike Calculator"<<endl;

   float miles;

   char response;

   cout<<"How many miles did you walk?. ";

   cin>>miles;

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

   cout<<"Continue? (y/n): ";

   cin>>response;

   while(response == 'y')

   {

   cout<<"How many miles did you walk?. ";

   cin>>miles;

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

   cout<<"Continue? (y/n): ";

   cin>>response;

   }

   cout<<"Bye!";

   return 0;

}

Explanation:

Here, I'll explain some difficult lines (one after the other)

The italicized represents the function that returns the number of feet

<em>int convert(float miles) </em>

<em>{ </em>

<em>    return miles * 5280; </em>

<em>} </em>

The main method starts here

int main() {

The next two lines gives an info about the program

   cout<<"Console:"<<endl;

   cout<<"Hike Calculator"<<endl;

   float miles;

   char response;

This line prompts user for number of miles

   cout<<"How many miles did you walk?. ";

   cin>>miles;

This line calls the function that converts miles to feet and prints the feet equivalent of miles

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

This line prompts user for another conversion

   cout<<"Continue? (y/n): ";

   cin>>response;

This is an iteration that repeats its execution as long as user continue input y as response

<em>    while(response == 'y') </em>

<em>    { </em>

<em>    cout<<"How many miles did you walk?. "; </em>

<em>    cin>>miles; </em>

<em>    cout<<"You walked "<<convert(miles)<<" feet"<<endl; </em>

<em>    cout<<"Continue? (y/n): "; </em>

<em>    cin>>response; </em>

<em>    } </em>

   cout<<"Bye!";

8 0
3 years ago
A list of the available non keyboard characters can be seen in windows by opening what utility
Leya [2.2K]
Character Map ... I hope This Helps
8 0
3 years ago
A. True
Ksivusya [100]
True 
You can only do it ascending because you will get confused 
7 0
3 years ago
What is software piracy
Tju [1.3M]
Software piracy is the illegal copying, distribution, or use of software.
8 0
3 years ago
Read 2 more answers
In the output at the command line from a router that reads - ip ospf message-digest-key 1 md5 CISCO-123 - what does the CISCO-12
11111nata11111 [884]

Answer: a) it is used as a password.

Explanation:

In order to be able to exchange routing information , CISCO routers use an authentication process, so when they send a message (a HELLO message for instance) the router that receives the message confirms that the message is authentic.

There are several types of authentication in OSPF, null, plain  and MD5.

The difference between them is as follows:

1) null, implies that no password is included in the packet header, it's the default mode.

2) plain: In this type of authentication, the password is sent transparently from a router to his neighbor, as a plain text which makes it vulnerable to attacks from packet inspection software, like Sniffer.

3) MD5, is a more secure mode, in which the password is not sent directly, but a hash built based on the packet contents and the password itself instead.

MD5 (Message Digest 5) is the name of the algoritm used to build the hash that receiver will compare with the sent by the sender in order to confirm authentication.

The chosen password, is placed at the end of the command, after the type of authentication (MD5 in this case), which in this case is "CISCO-123".  

7 0
3 years ago
Other questions:
  • In this question, we give two implementations for the function: def intersection_list(lst1, lst2) This function is given two lis
    15·1 answer
  • Computers that belong to the same domain can access a common security database of user and computer account information. This ty
    5·1 answer
  • Does anyone know the answers?
    8·1 answer
  • A computer byte is the amount of data (measured in bits) that CPU can manipulate at one time/
    8·1 answer
  • Read integers from input and store each integer into a vector until -1 is read. Do not store -1 into the vector. Then, output al
    11·1 answer
  • The Advanced Properties sheet enables you to add which of the following?
    15·1 answer
  • Explain the working principle of computer with suitable diagram​
    15·1 answer
  • Spark is electrical discharge in air, while air is mix of variety of gases what particles conduct electricity in gas
    12·1 answer
  • Why won't Brainly let me create an account? I have tried many times but it just loads.
    8·1 answer
  • 8. Choose the 3 correct statements for the code below.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!