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
andrezito [222]
2 years ago
13

Calculate the number of Characters and the size of words “Caleb University Imota, Lagos”using Taro Yamen​

Computers and Technology
1 answer:
Fantom [35]2 years ago
6 0

The code to calculate the number of characters and the size of words is as follows:

x = input("Enter your text here: ")

char=0

word=1

for i in x:

   char = char+1

   if(i==' '):

       word=word+1

print("Number of words in the given string ",word)

print("Number of characters in the given string ",char)

   

<h3>Code explanation:</h3>

The code is written in python

  • The first line of code, we store the users input in a variable called x.
  • Then we initialise the variable char to zero.
  • The variable word is also initialise to zero
  • The we loop through the user's input and count the character
  • We also look for space to know the word, then count the words .
  • Finally, we print the number of word and the number of character.

learn more on python code here: brainly.com/question/20379340

You might be interested in
Rafael needs to add a title row to a table that he has inserted in Word. What should he do? Use the alignment options. Use the M
raketka [301]

Answer:

Answer is C

Explanation:

6 0
2 years ago
Read 2 more answers
g Which statement is true about the difference between combinational logic circuits and sequential logic circuits? A) Combinatio
kogti [31]

Answer:

D.

Explanation:  

In combinational circuits, the current output values are always the same for the same set of input values, regardless the previous values.

We say that combinational circuits have no memory, or that the circuit has no feedback from the outputs.  

For sequential circuits, on the contrary, the current output values are not based in the current input values only, but on the previous output values as well.

So, the fact of having a defined set of input values at a given moment, doesn't guarantee which the output values will be.

We say that sequential circuits have memory, or that they have feedback from the outputs.

Examples of these type of circuits are R-S, J-K, D or T flip-flops.

4 0
2 years ago
You are given a class named Clock that has one int instance variable called hours.
Vlad [161]

Answer:

public Clock(int hours) {

       this.hours = hours;

   }

Explanation:

In Java programming language, Constructors are special methods that are called to initialize the variables of a class when a new object of the class is created with the new keyword. Consider the complete code for the class below;

<em>public class Clock {</em>

<em>    private int hours;</em>

<em>    public Clock(int hours) {</em>

<em>        this.hours = hours;</em>

<em>    }</em>

<em>}</em>

In this example above,  an object of this class can created with this statement Clock myclock = new Clock(6); This is a call to the constructor and passes a parameter (6) for hours

7 0
2 years ago
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject afte
SCORPION-xisa [38]

Changing a worksheet name in Microsoft Excel can be done in multiple ways, but only one of them is correctly explained in the provided option, which is (A) double-click both the worksheet tabs one at a time and then enter the new names.

The other options are incorrect. Even though you can change a worksheet’s name by right-clicking the sheet name, you also need to choose the appropriate option from the window bar that would appear – which is, of course, the rename option.

5 0
3 years ago
Read 2 more answers
What is the smallest colorable area on a display device
n200080 [17]
The smallest colorable area on a display would be a pixel 

8 0
2 years ago
Other questions:
  • An administrator working on a Windows Server 2016 Server Core installation needs to disable DHCP on all interfaces on the server
    12·1 answer
  • The adjustable contact of a potentiometer is placed at the center of its adjustment. If the total resistance is 5 kOhms, what is
    9·1 answer
  • Define a function setheight, with int parameters feetval and inchesval, that returns a struct of type heightftin. the function s
    6·1 answer
  • Possible consequences for plagiarism, listed in CAVA's Academic Integrity Policy, may include:
    9·1 answer
  • What is the name for the type of flash memory that is used by mobile devices to store their apps and data?
    6·1 answer
  • Suppose you will invest $100 per month at the beginning of the month for 40 years with interest rate
    5·1 answer
  • What is the Slide Sorter View used for?
    12·2 answers
  • Can somebody help me with this please
    6·2 answers
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • Find the max and min of a set of values using recursion Find the max and min of a set of values using recursion. First input the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!