72.4k views
3 votes
Which of the following commands will store the homewins and awaywins for manchester city and manchester united from epl in a numeric array named mw?

a) `mw = {'homewins': [Manchester City's homewins data], 'awaywins': [Manchester City's awaywins data]}`
b) `mw = {'homewins': [Manchester United's homewins data], 'awaywins': [Manchester United's awaywins data]}`
c) `mw = {'homewins': [Manchester City's homewins data, Manchester United's homewins data], 'awaywins': [Manchester City's awaywins data, Manchester United's awaywins data]}`
d) `mw = {'homewins': [Combined homewins data], 'awaywins': [Combined awaywins data]}`

User Renari
by
7.3k points

1 Answer

7 votes

Final answer:

The best command to store homewins and awaywins for both Manchester City and Manchester United in a numeric array named mw is given by option c, although it uses a dictionary, not strictly a numeric array.

Step-by-step explanation:

The correct command to store the homewins and awaywins for Manchester City and Manchester United from the English Premier League (EPL) in a numeric array named mw would be encapsulated within a dictionary (in programming languages like Python). However, the commands provided are not in the correct syntax to create a numeric array. The closest option is:

mw = {'homewins': [Manchester City's homewins data, Manchester United's homewins data], 'awaywins': [Manchester City's awaywins data, Manchester United's awaywins data]}

This command would create a dictionary that maps two keys (_'homewins'_ and _'awaywins'_) to their respective lists of data for both teams. But remember, if you want a numeric array specifically, you'd typically want to use a different data structure in most programming languages, such as a list or an array instead of a dictionary.

User Sederqvist
by
6.9k points