LAB 1 Count input length without spaces periods or commas Given a line of text as input output the

(LAB 1) Count input length without spaces, periods, or commas
Given a line of text as input, output the number of characters excluding spaces, periods, or commas.
Ex: If the input is:
Listen, Mr. Jones, calm down.
the output is:
21
Note: Account for all characters that arent spaces, periods, or commas (Ex: r, 2, !).
(LAB 2) LAB: Output range with increment of 10
Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer.
Ex: If the input is:
-15 30
the output is:
-15 -5 5 15 25
Ex: If the second integer is less than the first as in:
20 5
the output is:
Second integer cant be less than the first.
For coding simplicity, output a space after every integer, including the last.
(LAB 3) Print string in reverse
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters Quit, quit, or q for the line of text.
Ex: If the input is:
Hello there
Hey
quit
the output is:
ereht olleH
yeH
(LAB 4) Palindrome
A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: bob, sees, or never odd or even (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome.
Ex: If the input is:
bob
the output is:
bob is a palindrome
Ex: If the input is:
bobby
the output is:
bobby is not a palindrome
Hint: Start by just handling single-word input, and submit for grading. Once passing single-word test cases, extend the program to handle phrases. If the input is a phrase, remove or ignore spaces.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Obtain the general solution of the following DEs: i. y′′′ + y′′ − 4y′ + 2y = 0 ii. y(4) + 4y(2) = 0 iii. x(x − 2)y′′ + 2(x − 1)y′ − 2y = 0; use y1 = (1 − x) iv. y′′ − 4y = sin2(x) v. y′′ − 4y′ + 3y = x ; use y1 = e3x vi. y′′ + 5y′ + 6y = e2xcos(x) vii. y′′ + y = sec(x) tan(x)

Obtain the general solution of the following DEs: i. y′′′ + y′′ − 4y′ + 2y = 0 ii. y(4) + 4y(2) = 0 iii. x(x − 2)y′′ + 2(x − 1)y′ − 2y = 0; use y1 = (1 − x) iv. y′′ − 4y = sin2(x) v. y′′