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
Wittaler [7]
4 years ago
14

File Letter Counter

Computers and Technology
1 answer:
Zanzabum4 years ago
5 0

Answer:

The solution code is written in Python.

  1. fileName = input("Enter file name: ")
  2. target = input("Enter target character: ")
  3. with open(fileName, "r")as reader:
  4.    content = reader.read()
  5.    print(content.count(target))

Explanation:

Firstly, use <em>input() </em>function to prompt user for a file name. (Line 1)

Next, we use input() function again to prompt user input a target character (Line 2)

Create a reader object and user <em>read() </em>method to copy entire texts from to the variable<em> content </em>(Line 4 - 5).

At last we can get the number of times the specified character appears in the file using the Python string built-in method <em>count() </em>(Line 6)

You might be interested in
A customer would like you to install a high-end video card suitable for gaming. Your installation and configuration SHOULD inclu
Snowcat [4.5K]

Answer: • Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

Explanation

Your question isn't complete as you didn't put the options but I got the options online and the correct answers have been provided.

The installation and configuration for the high-end video card suitable for gaming will include:

• Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

4 0
3 years ago
Which statement best explains taxation without representation was a major issue for colonists?
Sauron [17]
Taxation without representation was a major issue for the colonists, because they were being unfairly taxed by the British without having a representative in the British Parliament to represent them ans state that they were against this. It was also one of the driving forces of the American Revolution, as it was just one of the grievances the colonists were experiencing from the British. 
4 0
3 years ago
Bob received a message from Alice which she signed using a digital signature. Which key does Bob use to verify the signature?Gro
alexira [117]

Answer:

Alice's public key

Explanation:A Public key is a key that can be used for verifying digital signatures generated using a corresponding private key which must have been sent to the user by the owner of the digital signature.

Public keys are made available to everyone required and they made up of long random numbers.

A digital signature signed with a person's private key can only be verified using the person's private key.

7 0
4 years ago
How can you protect your information when using wireless technology
Mnenie [13.5K]

Answer: Avoid using non-Bluetooth-paired or unencrypted wireless computer peripherals.

Explanation:

8 0
2 years ago
Which factor did not contribute to the increase of leisure travel in the early twentieth century in the United States?
Vitek1552 [10]
The second factor as it did not make travel easy at all
6 0
3 years ago
Read 2 more answers
Other questions:
  • In mathematics, the factorial of a positive integer n, denoted as n! , is the product of all positive integers less than or equa
    10·2 answers
  • One main advantage of CD-ROMs is that..
    7·1 answer
  • Which of the following is the final fate for average sized stars?
    12·1 answer
  • Make me die from laughter i will give brainlyest for the best joke
    11·1 answer
  • What is the HCF of smallest prime number and the smallest composite number?​
    12·1 answer
  • Write the function powersOf3ToN(n) that takes a possibly-negative float or int n, and returns a list of the positive powers of 3
    10·1 answer
  • Select the statement which most accurately describes the benefits and drawbacks of working from home and telecommuting.
    13·2 answers
  • What complications are imposed if one tries to implement a dynamic list using a traditional one-dimensional array
    14·1 answer
  • The address for the website you want to visit is called the browser internet URL World Wide Web
    5·2 answers
  • Why is it important for the scrum master to help the team focus on daily and iteration goals\
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!