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)
The code is written in python
learn more on python code here: https://brainly.com/question/20379340