Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 Write assignment statements that perform the following operations with the variables a , b , and c: Adds 2 to a and assigns

QUESTION 1
Write assignment statements that perform the following operations with the variables a, b, and c:
Adds 2 to a and assigns the result to b
Multiplies b times 4 and assigns the result to a
Divides a by 3.14 and assigns the result to b
Subtracts 8 from b and assigns the result to a
QUESTION 2
Assume the variables result, w, x, y, and z are all integers, and that w =5, x =4, y =8, and z =2. What value will be stored in the result after each of the following statements execute?
result = x + y
result = z *2
result = y / x
result = y z
result = w // z
QUESTION 3
What would the following display?
a =5
b =2
c =3
result = a + b * c
print(result)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions