diff --git a/Kanye-West Game/background.png b/Kanye-West Game/background.png new file mode 100644 index 00000000..9e1eb4e3 Binary files /dev/null and b/Kanye-West Game/background.png differ diff --git a/Kanye-West Game/kanye.png b/Kanye-West Game/kanye.png new file mode 100644 index 00000000..e4cade80 Binary files /dev/null and b/Kanye-West Game/kanye.png differ diff --git a/Kanye-West Game/main.py b/Kanye-West Game/main.py new file mode 100644 index 00000000..ef032171 --- /dev/null +++ b/Kanye-West Game/main.py @@ -0,0 +1,31 @@ +from tkinter import * +import requests + + +def get_quote(): + response = requests.get(url="https://api.kanye.rest") + + quote = response.json()["quote"] + print(quote) + canvas.itemconfig(quote_text, text =quote) + #Write your code here. + + + +window = Tk() +window.title("Kanye Says...") +window.config(padx=50, pady=50) + +canvas = Canvas(width=300, height=414) +background_img = PhotoImage(file="background.png") +canvas.create_image(150, 207, image=background_img) +quote_text = canvas.create_text(150, 207, text="initial state", width=250, font=("Arial", 30, "bold"), fill="white") +canvas.grid(row=0, column=0) + +kanye_img = PhotoImage(file="kanye.png") +kanye_button = Button(image=kanye_img, highlightthickness=0, command=get_quote) +kanye_button.grid(row=1, column=0) + + + +window.mainloop() \ No newline at end of file