Question: What is the output if the following code were executed? X = 5 Y = 0 while (X > 0 ): if (X % 2

What is the output if the following code were executed?

X = 5 Y = 0 while (X > 0 ): if (X % 2 == 1): Y = Y + 1 else: Y = Y + X X = X - 2 print( X, " ", Y)

0 3

-1 3

1 4

-1 4

2 points

QUESTION 32

If the number of edges the graph is 10 the the sum of the degrees for all the vertices is

20

10

40

None of the above

2 points

QUESTION 33

What is the result of the following logical operation ?

1011 1010

AND 1111 0000

1001 0000

1011 0000

1010 1111

1100 0000

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!