+ 2
What steps do you follow on the code coach am having a hard time and the code task is called Argentina
5 Antworten
+ 5
I will try to explain you the problem in more detail:
First of all you take two integer values. The first one is called Pesos and the second one dollars. This problem asks you to compare them and find the smallest price because you want to pay the lower price. The only problem is that they are not in the same unit of measurement. While you are comparing them you have to change one of them (e.g. convert pesos to dollars.).
Think about it.
Hope it helps 🙂
( please tell me if you want even more details)
+ 3
Elen gave a good explanation.
Perhaps the code I used can help you to understand what needs to be done to solve the problem:
https://code.sololearn.com/cetWF1aLIEeU/?ref=app
+ 1
The answer is pretty much there in the question itself.
Read that YELLOW box at the bottom.
Edit: If 4000 pesos is equal to $80.
Then how many pesos is $1.
+ 1
first convert Pesos to Dollars
after_convert = (pesos * 2) / 100
if after_convert less than or equal Dollars then print 'Pesos'
otherwise print 'Dollars'
0
I tried to solve this problem through the if condition and comparison. The code works on a PC, but when I rewrite it into a solution, the tests fail.