Question: You have been given two lists as shown in the code snippet below. ' ' ' The player's list contains the names of the active

You have been given two lists as shown in the code snippet below.
'''
The player's list contains the names of the active players, and the scores lists contain the score of each player
'''
players =['Steve', 'Elon', 'Jos']
scores ={'Steve': 100, 'Elon': 65, 'Jos': 77}
Now, you need to write an assert statement that checks whether a player Jacob exists or not. If he exists, then check whether he scored >50. In case of failure, the message Conditions not satisfied should be printed. Which of the following statements satisfies the given scenario?
assert Jacob in players, Conditions not satisfied
assert 'Jacob' in players and players['Jacob']>50, 'Conditions not satisfied'
assert 'Jacob' in players and scores['Jacob']>50, 'Conditions not satisfied'
None of the above
Attempt 0 of 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!