def main(): while True: print(" 1.Console ") print(" 2.GUI ") chosenUi = input("Choose interface:") if chosenUi == "1": game = Console() game.run() elif chosenUi == "2": pass else: print("Invalid option!")
import numpy as np import matplotlib as mpl from sklearn.model_selection import train_test_split from repository import Repository from controller import Controller from ui import Console if __name__ == "__main__": repository = Repository() controller = Controller(repository) console = Console(controller) console.run()
def main(): repo = Repository("bdate2.txt") contr = Controller(repo) console = Console(contr) console.run()
from domain import Melodie from repository import RepositoryMelodie, FileRepositoryMelodie from valid import * from service import ServiceMelodie from ui import Console repo = FileRepositoryMelodie("melodii.txt", Melodie.read, Melodie.write) valid = Validator() service = ServiceMelodie(repo, valid) ui = Console(service) ui.run()
def main(): repo = Repository("balance-scale.data") contr = Controller(repo) console = Console(contr) console.run()
repoClients.add(Client(36, "Joshua Kimmich")) #____________________________________________________________________________ repoRental.add( Rental(1, Book(1, "The Secret Crusade", "Oliver Bowden"), Client(20, "John Wright"), datetime.date(2019, 10, 5), None)) repoRental.add( Rental(2, Book(2, "The Illustrated Man", "Ray Bradbury"), Client(40, "Andrei Ivan"), datetime.date(2019, 10, 7), None)) #repoRental.add(Rental(3, Book(3, "The Glass Castle", "Jeannette Walls"), Client(35, "Frank Lampard"), datetime.date(2019, 10, 15), None)) repoRental.add( Rental(4, Book(4, "Still Alice", "Lisa Genova"), Client(78, "Gerard Pique"), datetime.date(2019, 11, 1), None)) repoRental.add( Rental(5, Book(5, "Olive Again", "Elizabeth Strout"), Client(24, "Moussa Dembele"), datetime.date(2019, 11, 7), None)) repoRental.add( Rental(6, Book(6, "The Nightshift Before Christmas", "Adam Kay"), Client(12, "Mohamed Salah"), datetime.date(2019, 11, 9), None)) repoRental.add( Rental(7, Book(7, "The Tales of Beedle the Bard", "J K Rowling"), Client(4, "Virgil Van Dijk"), datetime.date(2019, 11, 15), None)) repoRental.add( Rental(8, Book(8, "This is Going to Hurt", "Adam Kay"), Client(80, "Luuk De Jong"), datetime.date(2019, 11, 17), None)) c = Console(Srv, validatorInteger, validatorDate) c.run()