gruntfutuk Jun 13th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def my_functions():
- """ weekly sales """
- """ compute sales from input list """
- sales_number=int(input('Enter todays sales: '))
- for sales_number in toy_sales: # toy_sales is empty, so loop will never execute
- toy_sales.append(int(sales_number)) # sales_number is already an integer
- highest = max(sales_number) # sales number is just one integer so
- lowest = min(sales_number) # max() and min() aren't valid - need a list
- if sales_number.isdigit(): # sales_number is an integer, isdigit() is for strings
- toy_sales=toy_sales.isdigit() # this is not valid, toy_sales is a list, isdigit()
- # is used on strings and returns True or False
- # this line is incorrect needs adjustment
- elif(toy_sales)==sales_number: # invalid, trying to compare a list with an integer
- highest = max(toy_sales) # this would work if toy_sales was a populated
- lowest = min(toy_sales) # as above
- print("Your Highest Number is: " + str(highest))
- print("Your Lowest Number is: " + str(lowest))
- main() # function main isn't defined
RAW Paste Data