In one new file, “Sep5_FunctionsWithRVCopyHW”, do the following:
Create a new function called “convert_from_kg_to_gram”
The function accepts one argument/parameter: kg
Inside the function, convert from kg to gram by multiplying 1000 to kg
return the result of the conversion
get input from the user in the shell, and save that in a variable named “kg”
call the function with parameter from user input and save the return value in a variable called “result”.
print (for example) “There are 4000 grams in 4 KG”
EXAMPLE OUTPUT:
Enter the number of kg: 10
There are 10000 grams in 10 KG
If you have any questions feel free to email me jwidjanarko@ayclogic.com or ddjapri@ayclogic.com