Answer to Question #104347 in Python for Srana

Question #104347
Write an if/else statement that compares sold_yesterday and sold_today, and based upon that comparison assigns sales_trend the value -1 (the case where sold_yesterday is greater than sold_today) or 1.
1
Expert's answer
2020-03-02T09:53:24-0500
sold_yesterday = float(input("sold yesterday = "))
sold_today = float(input("sold today = "))
sales_trend = int
if sold_yesterday > sold_today:
    sales_trend = -1
else:
    sales_trend = 1
print("sales trend: {}".format(sales_trend))

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