Skip to content

Files

Latest commit

 

History

History

07-Function-that-returns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
tutorial

07 Functions that return

It is very good practice that all functions return something, even if it is None.

With what your function returns, you can create algorithms that use multiple functions at the same time.

For example, in this particular case, we have two functions available:

  • dollar_to_euro: that calculates the value in euros of a given value in dollars.

  • euro_to_yen: calculates the value in yen of a given value in euros.

📝 Instructions:

  1. Using the two functions available, print on the console the value of 137 dollars in yen.

💡 Hints:

Working backwards:

  • Our expected value is in yen.

  • Our available function euro_to_yen will provide that.

  • To get the euros, we will use the available function dollar_to_euro.