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 19:30
Can you make money in why are you guys so
Answers: 1
question
Computers and Technology, 22.06.2019 02:30
The can be used to paste text in any order
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
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, 08.12.2020 02:10
question
Mathematics, 08.12.2020 02:10
question
Mathematics, 08.12.2020 02:10
question
Mathematics, 08.12.2020 02:10