Answer:
When the body element CSS color style was changed, The color of all the text in the HTML file changed to the specified color, the same goes for font-size, font-weight, etc.
Explanation:
HTML or hypertext markup language is a markup language used in web development to implement the position and structure of the web page. It has no style, so, CSS or cascading style sheet is used to style the HTML elements in the web page.
Answer:
new_segment = [ ]
for segment in segments:
new_segment.append({'name': segment, 'average_spend': money})
print( new_segment)
Using list comprehension:
new_segment =[{'name': segment, 'average_spend': money} for segment in segments]
Using map():
def listing(a):
contain = {'name': segment, 'average_spend': money}
return contain
new_segment = [ ]
new_segment.append(map( listing, segment))
print(list(new_segment)
Explanation:
The python codes above create a list of dictionaries in all instances using for loop, for loop in list comprehension and the map function which collect two arguments .
Answer:
David can apply filter to the data in order to show only records that meet the criteria.
Explanation:
- Filter is a very helpful option that displays the records that you want to view, hiding rest of the unwanted records.
- Sometimes you want to extract and view only the records that match a specific criteria instead of viewing all the records.
- For example in the CUSTOMERS table which contains names, addresses, countries of customers. There are several customers from different countries but you only want to view the customers from Spain. So you can use filter feature to view all the customers from country Spain.
- In MS Access you can apply filters using Sort & Filter group in the Home tab by selecting the desired column. In SQL, WHERE clause can be used along with SELECT to for filtering and extracting certain records. SELECT will select the records from the table and WHERE clause will specify the criteria to select the certain records.