-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffa1194
commit 5ee7a41
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# sample code code for basic retail forecast calculation | ||
user_name = input("Enter your name: ") | ||
user_age = int(input("Enter your age: ")) | ||
user_company = input("Enter your employer: ") | ||
sales_ly = input("Enter last year's sales units: ") | ||
sellthru_ly = input("Enter last year's dollar sellthru: ") | ||
|
||
# user info to setup environment | ||
if user_name == "JC": | ||
print("Welcome to Rightward!") | ||
else: | ||
print("Welcome to", user_company) | ||
|
||
# calculation formulas | ||
sales_ly += 200 | ||
sales_fcst_sellthru = .85 | ||
sales_fcst_sellthru_pretty = sales_fcst_sellthru * 100 | ||
sales_fcst = sales_ly / sales_fcst_sellthru | ||
|
||
# print actual results for customers | ||
print(user_age + 10) | ||
print("Your sales LY were", sales_ly) | ||
print("Your sellthru LY was {:.2f}%".format(sellthru_ly)) | ||
print("Your forecast ship dollars are", sales_fcst) | ||
print("Your forecast sellthru is {:.2f}%".format(sales_fcst_sellthru_pretty)) |