What are the values of variables x, y, and z after the following code is run?
y = 0z = 0for x in range(5,7): if y > z: z, y = y, z y = y + x;

A. x == 7, y == 11, z == 6
B. x == 6, y == 6, z == 5
C. x = 6, y == 5, z == 6
D. x == 7, y == 12, z == 5


Answer: B

Computer Science & Information Technology

You might also like to view...

Write an algorithm for shared and exclusive locking. How does granularity affect this algorithm?

What will be an ideal response?

Computer Science & Information Technology

In OpenOffice Calc, a prewritten formula is called a(n) ________

A) macro B) argument C) address D) function

Computer Science & Information Technology

Which of the following is NOT something users do on social networking sites?

A) Social networks are all about hanging out virtually. B) Users spend time posting their own thoughts and activities to their friends and followers. C) Users separate short text messages or status updates into a separate feed. D) Typical users spend much of their time online cruising through the news feeds and profiles, finding out what people they know are doing.

Computer Science & Information Technology

To display a document with just the comments displayed, use  __________ .

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology