# coding: utf8 from city import City if __name__ == '__main__': city = City('Paris', 92) city.show_location() city.change_location('Lille', 59) city.show_location()
from city import City #if __name__ == '__main__': city = City("Wasquehal", 59) city1 = City("Croix", 59) city2 = City("Paris", 75) city3 = City("Tokyo", 00) city.show_location() city1.show_location() city.change_location( "Lille", 59) # he method changes the name and the department for city object city.show_location()
from city import City paris = City("Paris", 75) paris.show_location() paris = City("Paris", 75001) paris.change_location() roubaix = City("Roubaix", 59) roubaix.show_location() roubaix = City("Roubaix", 59100) roubaix.change_location() lille = City("Lille", 59) lille.show_location() lille = City("Lille", 59000) lille.change_location() bordeaux = City("Bordeaux", 33) bordeaux.show_location() bordeaux = City("Bordeaux", 33000) bordeaux.change_location() mouscron = City("Mouscron", 77) mouscron.show_location() mouscron = City("Mouscron", 7700) mouscron.change_location()