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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:00, mathman783
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
image
Computers and Technology, 23.06.2019 11:20, 1tzM3
Http is the protocol that governs communications between web servers and web clients (i. e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
image
Computers and Technology, 24.06.2019 02:30, talia43
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
image
Computers and Technology, 24.06.2019 17:30, leenzazou98241
What is the next step if your volume does not work on computer
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 in other subjects:

Konu
English, 14.10.2019 08:01
Konu
Geography, 14.10.2019 08:01
Konu
Mathematics, 14.10.2019 08:01