Write programs that read a sequence of integer inputs and


Python Assignment: Introduction to Programming Concepts

1. Write programs that read a sequence of integer inputs and print

a. The smallest and largest of the inputs.
b. The number of even and odd inputs.
c. Cumulative totals. For example, if the input is 1 7 2 9, the program should print 1 8 10 19.
d. All adjacent duplicates. For example, if the input is 1 3 3 4 5 5 6 6 6 2, the program should print 3 5 6.

2. Write a program that reads a set of floating-point values. Ask the user to enter the values, then print

• the average of the values.
• the smallest of the values.
• the largest of the values.
• the range, that is the difference between the smallest and largest.

3. Write programs that read a line of input as a string and print

a. Only the uppercase letters in the string.
b. Every second letter of the string.
c. The string, with all vowels replaced by an underscore.
d. The number of digits in the string.
e. The positions of all vowels in the string.

Solution Preview :

Prepared by a verified Expert
Python Programming: Write programs that read a sequence of integer inputs and
Reference No:- TGS02490741

Now Priced at $30 (50% Discount)

Recommended (99%)

Rated (4.3/5)