QuestionQ193

VerifiedControl Flow – Conditional Blocks and Loops

Consider the following code.

Question Image

Which of the following code snippets can extend the code so that 100 is printed to the monitor?

Choose two
Explanation

in tests whether a value is present in the list, while not in tests whether it is absent. Peter and Jane are in data, and Steve is not. Adding 50 for each of the two present names yields 100; adding 100 for the one absent name also yields 100.

Community Discussion

No comments yet. Be the first to start the discussion!