1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fenix001 [56]
3 years ago
5

You created the following dictionary relationships = {'Jimmy':'brother', 'Carol':'sister'}. You then executed the following code

, and received a KeyError exception. What is the reason for the exception? relationships['jimmy']
Computers and Technology
1 answer:
dybincka [34]3 years ago
3 0

Answer:

This is because the key in relationships['jimmy'] is wrong. The first letter "j" should be uppercase. The key in the given dictionary is "Jimmy" and therefore a lowercase "j" will result in a KeyError exception. The key is case sensitive and therefore a minor mistake in a single letter either in lowercase or uppercase will cause the error. The correct usage of key to address the value should be relationships["Jimmy"].

You might be interested in
What is a neuromorphic chip?
Dominik [7]

Answer:

A neuromorphic computer is a machine comprising many simple processors / memory structures (e.g. neurons and synapses) communicating using simple messages (e.g. spikes). ... Neuromorphic computing systems excel at computing complex dynamics using a small set of computational primitives (neurons, synapses, spikes).

Explanation:

The structure of neuromorphic computers makes them much more efficient at training and running neural networks. They can run AI models at a faster speed than equivalent CPUs and GPUs while consuming less power. This is important since power consumption is already one of AI's essential challenges.

3 0
3 years ago
Tracy has a file that contains a list of actors and the movies in which they acted. She wants to know the top 3 ranked actors fr
harina [27]

Answer:

{

private String name;

private String review;

/** Constructs a ProductReview object and initializes the instance variables. */

public ProductReview(String pName, String pReview)

{

name = pName;

review = pReview;

}

/** Returns the name of the product. */

public String getName()

{ return name; }

/** Returns the review of the product. */

public String getReview()

{ return review; }

}

The ReviewCollector class, shown below, is used to represent a collection of reviews to be analyzed.

public class ReviewCollector

{

private ArrayList<ProductReview> reviewList;

private ArrayList<String> productList;

/** Constructs a ReviewCollector object and initializes the instance variables. */

public ReviewCollector()

{

reviewList = new ArrayList<ProductReview>();

productList = new ArrayList<String>();

}

/** Adds a new review to the collection of reviews, as described in part (a). */

public void addReview(ProductReview prodReview)

{ /* to be implemented in part (a) */ }

/** Returns the number of good reviews for a given product name, as described in part (b). */

public int getNumGoodReviews(String prodName)

{ /* to be implemented in part (b) */ }

// There may be instance variables, constructors, and methods not shown.

}

3 0
3 years ago
Una pregunta cuales son los ataques de Sindel que por favor y me lo diga gracias
Len [333]
I do not know spanish please say in english
5 0
3 years ago
Why is iot architecture important?
Harlamova29_29 [7]
They need to make sure your building is easy to move around in. Beyond the building itself, architecture and design can help bring balance to people's lives. ... Well-designed schools create better learning environments. Workplaces with good architecture experience higher productivity.
7 0
3 years ago
Qué propiedades del bromato de potasio han hecho que sea el aditivo más usado en la fabricación del pan​
torisob [31]

Answer:

es la capacidad de unir proteínas presentes en la harina

4 0
3 years ago
Other questions:
  • Operating systems are designed to work with specific hardware. Which operating system works with Apple computers?
    8·2 answers
  • IblMessage.txt=welcome to fiji.what is the error in the coding and what type of error is it?(explain)​
    5·1 answer
  • All queries have an explicit location. true of false
    13·2 answers
  • Did this technological advancement take away or create jobs? Overall, what was the contribution of this technological advancemen
    12·1 answer
  • Which of the following is most likely to be considered plagiarism? Using materials from a source without proper citation. Adding
    5·1 answer
  • Which of the following statements is true? Computer disks are volatile storage devices Volatile storage is lost when a computer
    12·2 answers
  • Write and test a Python program to find and print the largest number in a set of real (floating point) numbers. The program shou
    5·1 answer
  • Exercise#3: Write a program that performs the following: Declare a two arrays called arrayA and arrayB that holds integer and th
    14·2 answers
  • Need help asap<br> give the correct answer!!
    15·2 answers
  • AJ created a list, and he needs all of the numbers to be in order. Which Python function will allow him to organize his list num
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!