Question: QUESTION 6 What will be displayed if the user enters 12942 when the following program is executed? sales = float(input(Enter the sales:)) if sales <

QUESTION 6

What will be displayed if the user enters 12942 when the following program is executed?

sales = float(input("Enter the sales:"))

if sales < 5000: commissionRate = 0.1 elif sales <10000 : commissionRate = 0.2 else: commissionRate = 0.3

print('The commission rate is', commissionRate)

QUESTION 7

What will be displayed if x = 5, y =7, and z = -3?

if x < y and x < z: print("a") elif y < x and y < z: print("b") else: print("c")

QUESTION 8

In the command range(3, 10, 2), what does the third argument (2) specify?

QUESTION 9

Call the following function to let turtle tess draw a heptagon (7 sides) of size 200.

def drawPolygon(t, sz, sides): """Make turtle t draw a polygon with given number of sides with sz as the side length.""" for i in range(sides): t.forward(sz) t.left(360/sides)

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 Finance Questions!