def sveIspisi(a): finalSTep_1 = 0; finalSTep_2 = 0; finalSTep_3 = 0; dobro = 0; xr = Data_Manager() print("Welcome to Trip to Germany!") print("Trip consists of of these cities all together") print("Rostock ") print("Lubeck (home of the best marzipan) ") print("Hamburg (Oma/Opa want to drive under the river - a taxi can do this as well)") print("Bremen ") print("Hannover (Consumer Electronics haven - purchase each a new iPad at 180 Euros each) ") print("Kassel ") print("Dusseldorf ") print("Koln (taxi will be needed to visit the castle 10km away from the hauptbahnhof) ") print("St. Augustine ") print("Bonn ") print("Wiesbaden ") print("** Frankfurt ") print("Mannheim ") print("Karlsruhe ") print("Baden Baden (Oma wants to visit a Spa here, therefore, you will need to spend the day) ") print("** Stuttgart ") print("** Munchen (Munich)") print("Nurnberg") print("Dresden ") print("Leipzig ") print("** Berlin") print("Basel, Switzerland (Opa and Dad want to purchase a nice watch and this is the best place for such a purchase - you will be spending $6k/watch) ") print() print("Here is the way using Petrol, Diesel or Train for every city") print("Cities of this trip:", xr.dajmigradpoGrad(a[0][0])) for sastavi in a: dobro = dobro + 1 b = sastavi[0] f = sastavi[1] city = xr.dajmigradpoGrad(b) ovajSPoj = xr.nadjiSpojeve(b, f) if ovajSPoj == None: index = 0 a = sastavi[2] b = sveGorivo(a) c = sveUP(a) d = sveVrijeme(a) xrx = sastavi[0] xrd = sastavi[1] ovajSPoj = Connection(xrx, xrd, 0, b, c, 0, d, a) putic, vrsta, cena, vrim = ovajSPoj.sveTezine() way_1 = finalSTep_1 + putic finalSTep_1 = way_1 way_2 = finalSTep_2 + cena finalSTep_2 = way_2 way_3 = finalSTep_3 + vrim finalSTep_3 = way_3 putit = sastavi[1] print("Distance Number:", dobro, "", city, putit) atm = float(putic) tip = vrsta fl = float(cena) vm = float(vrim) print(str.format("So know we know that traveling distance is: {0:.4} km, by {1}, traveling cost is: ${2:.5}, and traveling time is: {3:.4} minutes", atm, tip, fl, vm)) print("") print() print("Here are the alternating methods:") tour = finalSTep_2 tourtwo = finalSTep_3 / 60 tourthree = finalSTep_1 tourfour = finalSTep_1 * .621371 print(str.format(" and all together the Cost is : ${0:.6}, Time is: {1:.4} hours, Distance is: {2:.6} km ({3:.6} miles)", tour, tourtwo, tourthree, tourfour)) print()