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:30
Aprovides legal protection for something an individual has created
Answers: 1
question
Computers and Technology, 22.06.2019 09:00
Create a cell reference in a formula by typing in the cell name or         a. right-clicking the cell. b. clicking the cell. c. clicking the column where the cell is located. d. clicking the row where the cell is located.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
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
Mathematics, 03.02.2021 18:50
question
Mathematics, 03.02.2021 18:50
question
Biology, 03.02.2021 18:50
question
Mathematics, 03.02.2021 18:50
question
Mathematics, 03.02.2021 18:50
question
Mathematics, 03.02.2021 18:50
question
Mathematics, 03.02.2021 18:50
Questions on the website: 13722360