Answer to Question #173254 in Python for Miza Luna

Question #173254

Assume that we execute the following assignment statements:

width = 17

height = 12.0

For each of the following expressions, write the value of the expression and the type ( of the value of the expression )

1. width/ /2

2. width/2.0

3. height/3

4. 1 + 2 * 5

Use the Python interpreter to check your answers


1
Expert's answer
2021-03-21T04:46:30-0400
width = float(input("Enter the Width: "))
height = float(input("Enter the Height: "))


print("Value is : ", width // 2, "and type is: " ,type(width // 2))
print("Value is : ", width / 2.0 ,"and type is: " , type(width / 2.0))
print("Value is : ", width / 3 ,"and type is: " , type(width / 3))
print("Value is :" , 1 + 2 * 5,"and type is: " , type(1 + 2 * 5))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS