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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started