bettys-bike-shop
This commit is contained in:
14
bettys-bike-shop/src/bettys_bike_shop.gleam
Normal file
14
bettys-bike-shop/src/bettys_bike_shop.gleam
Normal file
@@ -0,0 +1,14 @@
|
||||
import gleam/float
|
||||
import gleam/int
|
||||
import gleam/string
|
||||
|
||||
// TODO: import the `gleam/float` module
|
||||
// TODO: import the `gleam/string` module
|
||||
|
||||
pub fn pence_to_pounds(pence: Int) -> Float {
|
||||
int.to_float(pence) /. 100.0
|
||||
}
|
||||
|
||||
pub fn pounds_to_string(pounds: Float) -> String {
|
||||
string.append("£", float.to_string(pounds))
|
||||
}
|
||||
Reference in New Issue
Block a user