Tuesday, July 28, 2020

Answer for Functions, dictionaries & while

https://365datascience.com/dwqa-answer/answer-for-functions-dictionaries-while/ -

Hi Andre!

Thanks for reaching out.

The function returns a single value. So, if you execute Price_while(5), you will be referring to the “lasagna” as you say. It is the only meal whose price is greater than or equal to 5, therefore we have 5*10=50 currency units spent.

Then, if you execute Price_while(4), you will be referring to the price spent for a box of spaghetti, which will be 4*6=24.

To obtain the result from the lecture, please use the code provided there. Thank you.

Hope this helps but please feel free to get back to us should you need further assistance. Thank you.
Best,
Martin




#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy

No comments:

Post a Comment