Create an empty set use a loop to add 10 random integers


PART A: Write all code in the main function

Make a dictionary for nine Tampa Bay Rays (see below). Use the player names as keys and a list for each value.

Each value list should hold the position played by the player, the batting order, and current batting average.

When the dictionary is complete, use a for loop to display the dictionary keys and values.

Next, use loop(s) to print the "lineup" (the dictionary in batting order). Duplicate the sample output for full points.

Pull Rivera and DeJesus. Substitute Wilson as catcher and Beckham as DH

Reprint the new lineup.

PART B: Write all code in the main function:

create an empty set.

use a loop to add 10 random integers, all from 10 to 30 inclusive, to the set.

use another loop to process the set:

display all elements of the set on one line separated by

count how many elements are even and how many elements are odd.

display the counts.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create an empty set use a loop to add 10 random integers
Reference No:- TGS01114929

Now Priced at $30 (50% Discount)

Recommended (97%)

Rated (4.9/5)