Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Latest commit

 

History

History

strings-2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

String Gymnastics 2

Introduction

Typically what makes our application unique is based on the input they ask for and what they do with it. Working with strings is something that we do on a daily basis. Luckily Ruby has some great support for string handling and manipulation.

Objectives

Dig deeper into the String and Regexp APIs.

Exercise

Using the code supplied in string-gymnastics-2.rb, use the shopping list in conjunction with the price list to calculate the total price of the shopping.

At the end of your script simply print a line of the format:

The price of the shopping list is: £pounds.pence.

Note: this time round, both the price list and the shopping list are in strings. You will need to work with these to create something you can work with.