Advertisement
msoo248

Zadanie3_lab8

Nov 28th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import Zadanie_1
  2. import Zadanie_2
  3.  
  4. def get_instructions():
  5.   while True:
  6.     try:
  7.       return int(input("wciśnij 1 - równanie kwadratowe, 2 - układ równań lub dowolny inny klawisz, aby zamknąć program: "))
  8.     except ValueError:
  9.         print("podana wartość nie jest liczbą!!!")
  10.  
  11. def choose_file():
  12.     x = get_instructions()
  13.     if x == 1:
  14.         Zadanie_1.amount_of_elements()
  15.     elif x == 2:
  16.         Zadanie_2.count_determinants()
  17.     else:
  18.         print("Zakończenie programu")
  19.         return
  20.  
  21. def main():
  22.     choose_file()
  23.  
  24.  
  25. if __name__ == "__main__":
  26.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement