Is my code correct? If it is, how can I stop iritatition one step befor costs2 are lesser than costs1? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Is my code correct? If it is, how can I stop iritatition one step befor costs2 are lesser than costs1?

https://code.sololearn.com/cjubkoRWlozh/?ref=app I need your help, please. I need to calculate the min construction costs, line goes under water and by land.

23rd May 2021, 3:00 PM
TeaserCode
5 Antworten
+ 1
In the break statement keep it inside curly braces {} and an indent.
23rd May 2021, 4:18 PM
Eashan Morajkar
Eashan Morajkar - avatar
0
Can you be more precisely?
23rd May 2021, 4:22 PM
TeaserCode
26th May 2021, 4:15 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
I think so it should work. can you send some example on what should be the output
26th May 2021, 4:16 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
I think the output is met when both costs are about equal. You can find it when you sum both costs.
26th May 2021, 4:45 AM
TeaserCode