Someone help me out please. I couldn't get this right | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Someone help me out please. I couldn't get this right

You are making a currency converter app. Create a function called convert, which takes two parameters: the amount to convert, and the rate, and returns the resulting amount. The code to take the parameters as input and call the function is already present in the Playground. Create the function to make the code work. Sample Input: 100 1.1 Sample Output: 110

14th Feb 2021, 9:53 PM
Jonathan Akpa Ajene
Jonathan Akpa Ajene - avatar
5 Answers
+ 1
Jonathan Akpa Ajene what have you tried?
14th Feb 2021, 10:01 PM
Kirill
Kirill - avatar
+ 1
Here is a way to solve the scenario in C#. https://code.sololearn.com/c86v39rXAI2J/?ref=app Please tag each post with the language you want help with and always attach your try in the original post.
15th Feb 2021, 4:06 PM
Elijah Brown
Elijah Brown - avatar
0
function convert (amount,rate){ var answer=amount*rate; var amount=42; var rate=0.72; return answer;} console.log(convert(amount,rate));
14th Feb 2021, 10:27 PM
Jonathan Akpa Ajene
Jonathan Akpa Ajene - avatar
0
Jonathan Akpa Ajene sorry, I only know python
14th Feb 2021, 10:29 PM
Kirill
Kirill - avatar
0
Ok
14th Feb 2021, 10:29 PM
Jonathan Akpa Ajene
Jonathan Akpa Ajene - avatar