subject

You are comparing the portion of female drivers on the phone to the portion of male drivers on the phone. You created a two-dimensional array using lists. There are 100 observations in your study. The following is an abbreviated version of the list data. data = [ ['male', True], ['female',True], ['male',False] ]
As an example, ['male', True] represents a male who is on the phone. ['female', False] represents a female who is not on the phone.

What is the missing line of code?

males = 0
malesOnPhone = 0
females = 0
femalesOnPhone = 0
for item in data:
if item[0] == 'male':
males = males + 1
:
malesOnPhone = malesOnPhone + 1
else:
females = females + 1
if item[1]:
femalesOnPhone = femalesOnPhone + 1

if item[0] == 'male'

if item[1] == 'male'

if item[1]

if item[0]

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Formula that contains a nested function that first calculates the average of the values in range e6: p6 and uses the round function to round that average to the nearest 10 dollars. use -1 for the value of the number digit argument. would the formula be =round(average(e6: p6),0
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 25.06.2019 01:00
Regular maintenance is a key component of automotive lift safety.
Answers: 1
question
Computers and Technology, 25.06.2019 01:00
Holly created a professional development plan to explore how she could advance from her entry-level position to the next step in her career. she has identified her current skills and the skills needed for the job she wants. what should she do now? a) ask a colleague for advice about work-life balance b) identify her areas for improvement c) plan a vacation before she begins her new job d) wait until a position opens before continuing her plan
Answers: 1
You know the right answer?
You are comparing the portion of female drivers on the phone to the portion of male drivers on the p...
Questions
question
Spanish, 02.11.2020 18:40
question
Mathematics, 02.11.2020 18:40
question
Mathematics, 02.11.2020 18:40
question
Mathematics, 02.11.2020 18:40
question
Chemistry, 02.11.2020 18:40
question
History, 02.11.2020 18:40
Questions on the website: 13722361