Provide me with the code to populate a 2d dictionary with a key of name, and 4 values…
- User
Provide me with the code to populate a 2d dictionary with a key of name, and 4 values each rated 1-100 for 10 famous movie badassess. The values should be toughness, intelligence, desirability, loose cannon score.
- Assistant
Sure, let's create a 2D dictionary in Python where the key is the name of a movie badass, and the values are another dictionary containing 'toughness', 'intelligence', 'desirability', and 'loose cannon score', each rated from 1-100. The code would look something like this:
────────────────────────────────────────────────────────────────────
pythonCopy codemovie_badasses = { "": { "toughness": 95, "intelligence": 85, "desirability": 90, "loose cannon score": 85, }, "": { "toughness": 90, "intelligence": 95, "desirability": 100, "loose cannon score": 60, }, "": { "toughness": 90, "intelligence": 90, "desirability": 75, "loose cannon score": 80, }, "Indiana Jones": { "toughness": 85, "intelligence": 95, "desirability": 90, "loose cannon score": 70, }, "": { "toughness": 90, "intelligence": 85, "desirability": 70, "loose cannon score": 75, }, "": { "toughness": 90, "intelligence": 95, "desirability": 85, "loose cannon score": 75, }, "": { "toughness": 95, "intelligence": 85, "desirability": 80, "loose cannon score": 85, }, "Beatrix Kiddo": { "toughness": 100, "intelligence": 85, "desirability": 80, "loose cannon score": 90, }, "": { "toughness": 80, "intelligence": 90, "desirability": 85, "loose cannon score": 95, }, "": { "toughness": 85, "intelligence": 85, "desirability": 85, "loose cannon score": 100, }, }
- User
can you rewrite the characters and their scores to fit in a tweet
- Assistant
Of course, the challenge here is to fit everything into 280 characters which is the limit for a single tweet on Twitter. Here's a compressed version of the characters and their scores:
────────────────────────────────────────────────────────────────────
txtCopy codeJW: T95/I85/D90/T95/I85/D90/T95/I85/D90/LC85, JB: T90/I95/D100/T90/I95/D100/T90/I95/D100/LC60, ER: T90/I90/D75/T90/I90/D75/T90/I90/D75/LC80, IJ: T85/I95/D90/T85/I95/D90/T85/I95/D90/LC70, : SC: T90/I85/D70/SC: T90/I85/D70/SC: T90/I85/D70/LC75, : Bourne: T90/I95/D85/Bourne: T90/I95/D85/Bourne: T90/I95/D85/LC75, : Furiosa: T95/I85/D80/Furiosa: T95/I85/D80/Furiosa: T95/I85/D80/LC85, BK: T100/I85/D80/T100/I85/D80/T100/I85/D80/LC90, JS: T80/I90/D85/T80/I90/D85/T80/I90/D85/LC95, TD: T85/I85/D85/LC100/T85/I85/D85/LC100/T85/I85/D85/LC100/T85/I85/D85/LC100.
In this shortened version,Tstands for toughness,Ifor intelligence,Dfor desirability, andLCfor loose cannon score. The names are abbreviated as follows:
: :
ER:
IJ: Indiana Jones
SC:
BK:
JS: