Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This should work but for some reason dose not #3

Open
kai9987kai opened this issue Feb 26, 2019 · 0 comments
Open

This should work but for some reason dose not #3

kai9987kai opened this issue Feb 26, 2019 · 0 comments

Comments

@kai9987kai
Copy link
Member

import time
import random
import sys
from tkinter import *
from tkinter import ttk

#Questions. MAKESURE THEY'RE DICTIONARY
Q1 = {"question": "Who was the first democratically elected leader of the Russian Federation?", "a": "A:Boris Johnson", "b": "B:Boris Yeltsin", "c": "C: Mikhail Gorbachev"}
Q2 = {"question": "What was the first Carry On film ever made?", "a": "A:Carry On Sergeant", "b": "B:Carry On Cleo", "c": "Carry On Doctor"}
Q3 = {"question": "Why did Tibetans grow long fingernails?", "a": "A:They're attention seekers.", "b": "B:To pick noses efficiently.", "c": "C:To scratch their back."}
Q4 = {"question": "Who signed the Magna Carta", "a": "A:Henry III", "b": "B:King John I", "c": "C:Richard I"}
Q5 = {"question": "What sport was Fanny Chmelar recognized for competing in?", "a": "A:Long Jump", "b": "B:Show Jumping", "c": "C:Ski-ing"}
Q6 = {"question": "Which of these North Korean dictators rules first?", "a": "A:Kim Il-Sung", "b": "B:Kim Jong-Un", "c": "C:Kim Jong-Il"}
Q7 = {"question": "What was Shaun Ryders Auto-biography called?", "a": "A:Twisting My Plums", "b": "B:Twisting My Melon", "c": "C:Twisting My Ankle"}
Q8 = {"question": "Bartommelo Christofori invented what?", "a": "A:The Car", "b": "B:The Piano", "c": "C:The Trumpet"}
Qs = [Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8]
Random = True



print(Q8)
root = Tk()

Qa = Frame(root)
Qb = Frame(root)
Qc = Frame(root)
QD = Label(root, text=random.choice(Qs))
DashTable = Frame(root)
def new():
    QD.configure(text=random.choice(Qs))
Qr = QD.cget("text")
#Cash Build Up
CBT = 0

print(QD.cget("text"))


root.resizable(False, False)
root.title("The Dash")
DTEmpty = "******"
DTHOME = "*HOME*"
DTDASHER = "  ↓↓  "

global score 
def ANSWER1():



    if Qr == Q1:
        score =+ 1
        print(score)
        new()
    if Qr == Q2:
        score =+ 1
        print(score)
        new()
    if Qr == Q3:
        score =- 1
        print(score)
    if Qr == Q4:
        score =+ 1
        print(score)
    if Qr == Q5:
        score =- 1
        print(score)
    if Qr == Q6:
        score =+ 1
        print(score)
        new()
def ANSWER2():
    if Qr == Q1:
        score =- 1
        print(score)
    if Qr == Q2:
        score =-  1
        print(score)
    if Qr == Q3:
        score =+ 1
        print(score)
        new()
    if Qr == Q4:
        score =+ 1
        print(score)
        new()
    if Qr == Q5:
        score =- 1
        print(score)
    if Qr == Q6:
        score =- 1
        print(score)
    if Qr == Q7:
        score =- 1
        print(score)
        new()
    if Qr == Q8:
        score =+ 1
        print(score)
        new()

def ANSWER3():
    if Qr == Q1:
        score =- 1
        print(score)
    if Qr == Q2:
        score =- 1
        print(score)
    if Qr == Q3:
        score =- 1
        print(score)
    if Qr == Q4:
        score =- 1
        print(score)
    if Qr == Q5:
        score =+ 1
        print(score)
        new()
    if Qr == Q6:
        score =- 1
        print(score)
    if Qr == Q7:
        score =- 1
        print(score)


ButtonA = Button(text=["   a   "], fg="red", command = ANSWER1)
ButtonB = Button(text=["   b   "], fg="red", command = ANSWER2)
ButtonC = Button(text=["   c   "], fg="red", command = ANSWER3)



QD.pack()
Qa.pack()
Qb.pack()
Qc.pack()
ButtonA.pack(side=LEFT)
ButtonB.pack(side=LEFT)
ButtonC.pack(side=LEFT)
root.iconbitmap('favicon.ico')  # Set icon
root.mainloop()
@kai9987kai kai9987kai pinned this issue Mar 1, 2019
@kai9987kai kai9987kai unpinned this issue Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant