Question: python3 7. Given the following assignment: x = 2, Indicate what each of the following Python statements would print print(x) print('x') print(x) print(x + 1)

python3
python3 7. Given the following assignment: x = 2, Indicate what each

7. Given the following assignment: x = 2, Indicate what each of the following Python statements would print print("x") print('x') print(x) print("x + 1") print('x' +1) print(x + 1) 8. Given the following assignments: i1=2, 12-5, 13=-3, d1=2.0, and d2=5.0 Evaluate each of the following Python expressions. a) 12/11 b) 12//i1 c) d2/d1 d) i1/d2 e) 11/12*d1 ) d1*i1/12 B) d1 + d2 + d2/3 h) 3* 11 // 12. d1 - d2 9. Sort the following binary operators in order of high to low precedence: +,-./1.7,%, -. 10. Try some of following activities within a Python program: a) print a variable that has not been assigned b) convert the string 'two' to an integer c) add an integer to a string d) assign to a variable named end-point e) compute raise a floating-point number to a large power, as in 1.520,000 f) compute x=5/(3-2-1) What circumstances can cause each of the following run-time errors to arise? a) NameError b) ValueError c) ZeroDivisionError d) OverflowError e) SyntaxError f) TypeError

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!