Computers and Technology

Using the For loop Just like the while and the do-while loop, a for loop allows you to repeat your codes for the desired number of times. In this program, you will count the number of letters of the alphabet, digits, whitespaces and special characters in a user entered string. You need to have three separate counters for the uppercase letters, the lowercase letters and the total number of letters. Any character that is not a letter, a digit or a whitespace is a special character.
To complete this program:
• Using a suitable message, get a string from the user. Note that the string may contain more than one word.
• Inside a while loop, test each character by processing each character of the string one at a time. Think about initialization, termination and update conditions for this loop.
• If it is a letter of the alphabet, a digit or a whitespace, update appropriate counters. If it is neither of them, update the counter for the special characters. Inform the user about all the counts.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:00, Leggett8152
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
image
Computers and Technology, 22.06.2019 10:00, kimmmmmmy333
According to alisa miller foreign news bureaus
Answers: 3
image
Computers and Technology, 22.06.2019 13:00, ajayfurlow
Which option should u select to ignore all tracked changes in a document
Answers: 1
image
Computers and Technology, 22.06.2019 22:40, Bgreene2377
In this lab, you complete a python program that calculates an employee's annual bonus. input is an employee's first name, last name, salary, and numeric performance rating. if the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. if the rating is 4 or higher, the rate is 0. the employee bonus is calculated by multiplying the bonus rate by the annual salary.
Answers: 1
Do you know the correct answer?
Using the For loop Just like the while and the do-while loop, a for loop allows you to repeat your...

Questions in other subjects:

Konu
Chemistry, 18.11.2020 06:00
Konu
History, 18.11.2020 06:00
Konu
Chemistry, 18.11.2020 06:00