Answer:
what issue do you think are important in our life
The best answer in this case to improve readability of the program is for Linda to improve the structure (Answer C). Code structure in a program can help convey logic and make the code much more readable to the user. This can include things like using tabs and spacing more effectively, and adding functions that can be called instead of repeating the same lines of code in order to repeat a certain process.
Answer:
Written in Python:
fruit_dictionary = {}
fruit_dictionary = {'apple': 'red', 'orange': 'orange', 'banana': 'yellow'}
Explanation:
First (although, not necessary), we create an empty dictionary named fruit_dictionary on line 1
Next, we populate the dictionary using the following syntax:
{key-1:value-1, key-2:value-2,......,key-n:value-n}
In this case, the entry would be:
{'apple': 'red',
'orange': 'orange',
'banana': 'yellow'}
The items on the first column (i.e. apple, orange and banana) are the keys while the items on the second (i.e. red, orange and yellow) are the values of the dictionary
To print the items in the dictionary, you can add the following line of code:
<em>print(fruit_dictionary.items()) </em>
Answer:
Let's say you need to remember some information, the way moviegoers tried to remember the name of the movie. Instead of storing it in your human memory, you can store information in your computer's memory using Python. This is called assigning a string value to a variable.
To assign a string value to a variable in Python, follow this example. Select each part of the code to see how it works with the movie title example.
movieTitle = "Live. Die. Repeat."
This line of Python code is an example of an assignment statement. In an assignment statement, you tell Python, "This variable is assigned this string value."
Explanation:
Answer:
Explanation:
try numpy:
import numpy as np
print(np.average([3, 4, 8]))
output:
5.0