From c460a26850eca5ded047d0eb0d183b861087aa53 Mon Sep 17 00:00:00 2001 From: standenboy Date: Tue, 30 Apr 2024 14:22:45 +0100 Subject: write up update --- comp/work/31/menu.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 comp/work/31/menu.py (limited to 'comp/work/31/menu.py') diff --git a/comp/work/31/menu.py b/comp/work/31/menu.py new file mode 100644 index 0000000..8f3c009 --- /dev/null +++ b/comp/work/31/menu.py @@ -0,0 +1,20 @@ +import merge +import bubble + + +while True: + list = [] + inp = "" + print("enter nums, then enter END") + while inp != "END": + inp = input("number: ") + if inp != "END": + list.append(inp) + + sort = int(input("1) bubble, 2) merge: ")) + + if sort == 1: + print(*merge.sort(list), sep=", ") + + else: + print(*bubble.sort(list), sep=", ") -- cgit v1.2.3