Dictionary for nine tampa bay rays

Assignment Help Basic Computer Science
Reference no: EM131376783

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. See page 374.
  • 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 (see sample output).
  • Reprint the new lineup.

SAMPLE OUTPUT

Rays starters

DeJesus ['DH', 6, 299]
Loney ['1B', 4, 222]
Rivera ['C', 9, 194]
Forsythe ['2B', 5, 304]
Souza Jr ['RF', 2, 229]
Longoria ['3B', 3, 282]
Cabrera ['SS', 7, 214]
Kiermaier ['CF', 1, 240]
Guyer ['LF', 8, 274]

Today's lineup

Batting 1 : CF Kiermaier ,current avg: 240
Batting 2 : RF Souza Jr ,current avg: 229
Batting 3 : 3B Longoria ,current avg: 282
Batting 4 : 1B Loney ,current avg: 222
Batting 5 : 2B Forsythe ,current avg: 304
Batting 6 : DH DeJesus ,current avg: 299
Batting 7 : SS Cabrera ,current avg: 214
Batting 8 : LF Guyer ,current avg: 274
Batting 9 : C Rivera ,current avg: 194

Lineup changed

Batting 1 : CF Kiermaier ,current avg: 240
Batting 2 : RF Souza Jr ,current avg: 229
Batting 3 : 3B Longoria ,current avg: 282
Batting 4 : 1B Loney ,current avg: 222
Batting 5 : 2B Forsythe ,current avg: 304
Batting 6 : DH Beckham ,current avg: 200
Batting 7 : SS Cabrera ,current avg: 214
Batting 8 : LF Guyer ,current avg: 274
Batting 9 : C Wilson ,current avg: 152

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 ** (see sample outputs).
    • count how many elements are even and how many elements are odd.
  • display the counts.

SAMPLE OUTPUT

12**16**17**18**20**21**22**23**24**28**

Set has 7 even numbers and 3 odd numbers

SAMPLE OUTPUT

10**12**14**16**18**20**21**22**25**26**

Set has 8 even numbers and 2 odd numbers

Reference no: EM131376783

Questions Cloud

What is the difference between an entity and an attribute : What are the four primary traits that help determine the value of information?- What is the difference between an entity and an attribute?
What is data warehouse and why business want to implement : What is a data warehouse and why would a business want to implement one?- Why would you need to use multidimensional analysis?
Establish a baseline of normal use : The organization then needs to establish a baseline of normal use in order to determine an anomaly.   Additionally a lot of commercial organizations use git hub and cloud storage, which this malware uses both.  Very hard to defend against this typ..
Research your chosen failure of creative thought : Identify an instance in which an individual or group was unsuccessful in using creative thinking to solve a problem, (such as the passage of prohibition in the United States in an attempt to reduce crime and improve living conditions for the worki..
Dictionary for nine tampa bay rays : Make a dictionary for nine Tampa Bay Rays (see below). Use the player names as keys and a list for each value. See page 374. Each value list should hold the position played by the player, the batting order, and current batting average.
Describe two of the gestalt laws of perceptual organization : Describe two of the Gestalt Laws of perceptual organization, illustrating each with a specific example.Evaluate the fit between Gestalt theories of perceptual organization and Biederman's Geon Theory.Describe the differences and similarities among fi..
Describe two scenarios for use of given type of software : Describe two scenarios (other than those described here) for the use of this type of software: one in which the use would be ethical and one in which it would be unethical.
Principal components of telecommunications networks : What are the principal components of telecommunications networks and key networking technologies? Let's begin by describing the features of a simple network.
Write on a freedom of speech issue : If you want to write on a freedom of speech issue, you could write about whether or not businesses should have the right not to serve homosexual couples

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What about ancillary goals

Given the great variety of items for an auditor to evaluate, what should the PM do given that the project evaluation basis was clearly laid out in the project plan?

  How spki be augmented to support policy

Consider a policy that, for reasons of separation of duties, does not allow an entity to exercise the rights it may grant (delegate) to others. How could SPKI be augmented to support such a policy?

  How bssids are assigned in ad hoc and infrastructure network

A BSS ID (BSSID) is a 48-bit address assigned to a BSS in an 802.11 network. Do some research and find what the use of the BSSID is and how BSSIDs are assigned in ad hoc and infrastructure networks.

  What is the precedence graph for the schedule

Are there any serial schedules that must be equivalent (regardless of what the transactions do to the data), but are not conflict-equivalent?

  Demonstrate criteria of a good design and good navigation

Good Design - This second web site should demonstrate our criteria of a good design and good navigation. Prepare a self-assessment document to post to the dropbox that addresses the following

  Degree of risk presented by construction project hazards

It is critical to the safety management process of construction projects that risk is evaluated and managed in a systematic manner. Describe a methodology for systematically assessing the degree of risk presented by construction project hazards.

  Animation in the alice development environment

Create an original animation in the Alice development environment, using what you have learned about objects, methods, parameters, decision structures, repetition structures, and functions.

  What is a system development methodology

1. What is a system development methodology? 2. List the six major reasons that projects fail. 3. List six critical factors that contribute to project success.

  Research of siem products

Write a 3 page summary of your research of SIEM products. At a minimum, your summary must include the following: An introduction or overview for the security technology category (SIEM). A review of the features, capabilities, and deficiencies for y..

  Leading the internal investigation of the accident

You are the chief systems engineer for Sir Richard Branson of Virgin Galactic Corporation, Ltd. As you are aware, last Friday, October 31st, there was a tragic and serious failure of SpaceShipTwo, during a powered test flight from the Mojave Spa..

  Installing the microsoft office suite software

Describe your experience installing the Microsoft Office Suite software. Indicate the version of the software that you installed, and the name and version of the operating system that you used.

  Write a java applet that animates myhashmap

Write a Java applet that animates MyHashMap as shown in Figure 27.8(see below), page 994 You can change the initial size of the table. Assume the load-factor threshold is 0.75.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd