Write a function that accepts the first name, last name and age. The functions should return the following string “(first name) (last name) is (age) old”.

computer science

Description

1. Write a function that accepts the first name, last name and age.

The functions should return the following string “(first name) (last name) is (age) old”.

For example: infoÇJohn”, Doe”, 32) should retixn “John Doe is 23 years old”.

2. Write a function to convert Euro into SEK. Make the exchange rate to 10.254.

The function shotid return how much Euro the user want to convert and how much SEK they

will get.

For example: euroSek(10) should return €10 wil give you 102,24SEK.

3. Write a function to order coffee. One cup is 15SEK. If the user orders to a value of more Than

1 OOSEK they should get a discount of 15%.

The function shotid return “You ‘ve ordered (Number c cts}. That wil be (Amount to pay).

if the cost is greater than 100SEK add “Since you ordered for more than 100SEK you get 15%

oft”.

For example: orderCoffee(3) should return You’ve ordered 3 cups of coffee. That wil be

45SEK.

4. Write a function that converts a string either to uppercase or to lowercase. The function

shoi.id accept a string and a boolean.

If the boolean is true, make the string upper case. If it’s false make the string lower case.

For example: makeLettersBigHello my name is Jesper”, true) should return HELLO MY

NAME IS JESPER


Related Questions in computer science category