State the order of evaluation of the operators in each of the following Python statements and show the value of x after each statement is performed.

a) x = 7 + 3 * 6 / 2 - 1
b) x = 2 % 2 + 2 * 2 - 2 / 2
c) x = ( 3 * 9 * ( 3 + ( 9 * 3 / ( 3 ) ) ) )


a) x = 7 + 18 / 2 - 1
x = 7 + 9 - 1
x = 16 - 1
x = 15
b) x = 0 + 2 * 2 - 2 / 2
x = 0 + 4 - 2 / 2
x = 0 + 4 - 1
x = 4 - 1
x = 3
c) x = ( 3 * 9 * ( 3 + ( 9 * 3 / 3 ) ) )
x = ( 3 * 9 * ( 3 + ( 27 / 3 ) ) )
x = ( 3 * 9 * ( 3 + ( 9 ) ) )
x = ( 3 * 9 * ( 3 + 9 ) )
x = ( 3 * 9 * ( 12 ) )
x = ( 3 * 9 * 12 )
x = (27 * 12)
x = (324)
x = 324

Computer Science & Information Technology

You might also like to view...

The three properties which define a RecordSet are ________, ________ and ________.

(a) Cursor, Lock, Source. (b) CurosrType, LockType, SourceType. (c) CursorType, LockType, Source. (d) Record, Type, Source.

Computer Science & Information Technology

You can add the Section indicator to the _____ using a shortcut menu.

A. Ribbon B. Quick Access Toolbar C. status bar D. none of the above

Computer Science & Information Technology

The lightest notebook computers, which weigh less than 3 pounds, are equipped with a(n) ____-inch display.

A. 8 B. 12.1 C. 13.5 D. 14.9

Computer Science & Information Technology

?The person in the role of a _____ ensures that a website is accessible via the Internet.

A. ?content specialist B. ?website designer C. ?marketing professional D. ?network administrator

Computer Science & Information Technology