Skip to content

lashd/rubybasics1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shop

Excercise:

Story: I went in to a shop with the following shopping list:

Shopping list

  • orange

  • apple

  • apple

  • orange

  • tomato

  • cereal

  • bread

  • orange

  • tomato

Price list

The prices of the above items are

  • orange = 10p

  • apple = 20p

  • bread = £1.10

  • tomato = 25p

  • cereal = £2.34

Task 1

Add to the code in lib/shop.rb to print out the cost of the shopping list in pence

Don’t do below this point yet :)

Write a till for me to run through the items I have chosen.

produce a receipt

find the cost of an item

remove an item

About

I am running a ruby club at BSkyb, this is was some of the material for one fhe exercises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages