diff --git a/calculator/main.py b/calculator/main.py index 66a174e..3db0fd1 100644 --- a/calculator/main.py +++ b/calculator/main.py @@ -7,6 +7,8 @@ from tkinter import * from tkinter import ttk +from random import randrange +dialogue = ["Ask someone else", "I don't know", "Let me sleep on it", "Somewhere between 0-100","I know it but I won't tell you"] class IntButton: def __init__(self, calculator, name): @@ -37,7 +39,7 @@ def __init__(self, root): self.stored_op = None # Create a new window - self.window = ttk.Frame(root, padding = 10) + self.window = ttk.Frame(root, padding = 100) # Use the grid geometry manager self.window.grid() # Attach the display to the top of the grid @@ -51,7 +53,7 @@ def __init__(self, root): "8", "9", "+", "-", "*", "/", "%", "=" ]): button = self.makeButton(button_name) - button.button.grid(column = index % COLUMNS, row = index // COLUMNS + 1) + button.button.grid(column = index % COLUMNS, row = index // COLUMNS + 5) print("Compsoc calculator") # Show the display register @@ -61,7 +63,7 @@ def redo_display(self): # Show the accumulator def display_acc(self): - self.display["text"] = str(self.acc) + self.display["text"] = dialogue[randrange(5)] # Handle number button press def handle_digit(self, digit):