answer.
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
Delvig [45]
2 years ago
11

Write a loop that counts the number of space characters in a string. Recall that the space character is represented as ' '.

Computers and Technology
1 answer:
Jlenok [28]2 years ago
3 0

Answer:

I am writing Python program.

string = input("Enter a string: ")

print(string.count(' '))

Explanation:

The first statement takes input string from the user.

input() is used to read the input from the user.

The next statement uses count() function to count the number of times the specified object which is space ' ' here occurs in the string.

The print() function is used to return the number of times the space occurs in the string entered by the user.

Output:

Enter a string: How are you doing today?

4

The screenshot of program and its output is attached.

You might be interested in
Your network administrator finds a virus has been successfully inserted into the network software. The virus itself is now consi
Svetlanka [38]

Answer: Vulnerability of

Explanation:

The network administrator was able to identify that virus before it led to denial of service to users. Since it has been discovered, it is no longer a threat as measures will be taken to eliminate it. But a virus that was successful uploaded shows how vulnerable the system is or how bad the security protections put in place are. Steps has to be taken to ensure it does not reoccur.

7 0
1 year ago
Read 2 more answers
Temperature Class Write a Temperature class that will hold a temperature in Fahrenheit and provide methods to get the temperatur
posledela

Answer:

Explanation:

   public class Temperature

   {

       double ftemp;

       public int Constructor(double fahrenheit)

       {

           ftemp = fahrenheit;

          return Convert.ToInt32(ftemp);

       }

       public void setFahrenheit(double fahrenheit)

       {

           ftemp = fahrenheit;

       }

       public void getFahrenheit()

       {

           ftemp = Constructor(ftemp);

       }

       public void getCelcius()

       {

           ftemp = (ftemp - 32) * 5 / 9;

       }

       public void getKelvin()

       {

           ftemp = (ftemp - 32) * 5 / 9 + 273.15;

       }

   }

8 0
2 years ago
It has been said that the quality of our relationships depends in large part on the quality of our
timurjin [86]

Answer:

people

Explanation:

6 0
2 years ago
Mary is writing an article about the animal kingdom. She wants to place image below the text. Which menu should Mary choose for
marysya [2.9K]

The Wrap Text menu.

The positioning of text in Word is sometimes not lined up with the inserted picture. By default, when you insert an image or a picture, its layout is set to inline with text. To change that, double click on the picture and then click the Wrap Text option. A number of options will pop up with text graphics.


7 0
2 years ago
Read 2 more answers
Which type of memory helps in reading as well as writing data? With the help of , a computer can read as well as write or modify
Anvisha [2.4K]

Answer:

RAM (Random access memory)helps in reading aswell as writing data.

Explanation:

Random access memory is a computer memory that can be read and written.Where as ROM (read only memory) can only be read and cannot be written.RAM contains circuits with multiplexers and demultiplexers to connect the datalines to the addressed data for reading or writing.There are majorly two types of RAM .They are SRAM(static random access memory) and DRAM(dynamic random access memory).

4 0
2 years ago
Read 3 more answers
Other questions:
  • What is the output of 1101 x 10 == 11000 + 10?
    12·1 answer
  • What technique creates different hashes for the same password? ccna routing protocols final answers?
    7·1 answer
  • When conducting research, protecting the privacy of patients requires careful attention to ensure ?
    11·2 answers
  • Most GUIs provide all of the following except _____.
    12·2 answers
  • Assume that the variables gpa, deansList and studentName, have been declared and initialized. Write a statement that adds 1 to d
    13·1 answer
  • Write a program to determine all pairs of positive integers, (a, b), such that a < b < 1000 and [a2 + b2 + 1)/(ab) is an i
    13·1 answer
  • Gwen recently purchased a new video card, and after she installed it, she realized she did not have the correct connections and
    6·1 answer
  • Which of the following sorting algorithms is described by this text? "Take the item at index 1 and see if it is in order compare
    10·1 answer
  • Peter took a selfie in his room. He was a wearing a light blue shirt. But he failed to realize that that shirt would clash in co
    12·2 answers
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!