issues
search
Satishrajc
/
hello-world
Just a trail to creat a repository in GitHub
0
stars
0
forks
source link
Simple Python Programs for Beginners
#1
Open
Satishrajc
opened
8 years ago
Satishrajc
commented
8 years ago
to help myself.
nmcginty
commented
8 years ago
Write a function perishable that has one parameter
number of items in the store
The function reads the bar code (integer)
for each item and its price(float)
All perishable items in the store have EVEN bar codes
The function finds and returns the number of
Perishable items that cost under 2 dollars
Write main that reads the number of items in the store
calls function perishable to find number of perishable
items that cost under 2 dollars
if there are no such items program prints error message
Can randomly generate data
Bonus functions also finds the average price for all
perishable items and average for all non perishable
to help myself.