Application Development using Python (18CS55) VTU Questions and Solutions - 1
1. Demonstrate the operator precedence & associative rule with respect to arithmetic operations with examples. 5 M Operator Operation Example Evaluates to Associative rule ** Exponent 2 ** 3 8 right-to-left % Modulus/remainder 22 % 8 6 Left to right // Integer division/floored quotient 22 // 8 2 Left to right / Division 22 / 8 2.75 Left to right * Multiplication 3 * 5 15 Left to right - Subtraction 5 - 2 3 Left to right + Addition 2 + 2 4 Left to right 2. Implement a Number Guessing Game by ensuring the following criteria • The guess number is generated by the ...