# TYPING PAGE ALL WIDGETS FUNCTION #
def typing_page(input_words): # input_words refers to type of word -set called
(science,tech,lit,sports)
global type_window
type_window = Tk()
type_window.title("THIS IS A SPEED TEST !" )
type_window.geometry("{0}x{1}+0+0".format(type_window.winfo_screenwidth(),
type_window.winfo_screenheight()))
type_window.configure(bg='SkyBlue4')
random.shuffle(input_words)
# WORD FETCHED FROM FILE DISPLAY #
global word_display
word_display = Label(type_window,
text=input_words[0],
font=('arial', 50, 'italic bold'),
bg="SkyBlue4",
fg="yellow")
word_display.place(x=525, y=250)
score_heading = Label(type_window,
text='Words Correct : ',
font=('arial', 35, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
score_heading.place(x=10, y=100)
# WORDS CORRECT COUNT #
global score_display
score_display = Label(type_window,
text=score,
font=('arial', 35, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
score_display.place(x=80, y=180)
# WPM DISPLAY #
wpm_heading = Label(type_window,
text="Your WPM :",
font=('arial', 25, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
wpm_heading.place(x=100, y=450)
global wpm_count
wpm_count = Label(type_window,
text=wpm,
font=('arial', 25, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
wpm_count.place(x=100, y=500)
# TIME COUNTDOWN DISPLAY #
timer = Label(type_window,
text='Time Left :',
font=('arial', 35, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
timer.place(x=900, y=100)
# TYPING PAGE ALL WIDGETS FUNCTION #
def typing_page(input_words):
global type_window
type_window = Tk()
type_window.title("THIS IS A SPEED TEST !")
type_window.geometry("{0}x{1}+0+0".format(type_window.winfo_screenwidth(),
type_window.winfo_screenheight()))
type_window.configure(bg='SkyBlue4')
random.shuffle(input_words)
# WORD FETCHED FROM FILE DISPLAY #
global word_display
word_display = Label(type_window,
text=input_words[0],
font=('arial', 50, 'italic bold'),
bg="SkyBlue4",
fg="yellow")
word_display.place(x=525, y=250)
score_heading = Label(type_window,
text='Words Correct : ',
font=('arial', 35, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
score_heading.place(x=10, y=100)
# WORDS CORRECT COUNT #
global score_display
score_display = Label(type_window,
text=score,
font=('arial', 35, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
score_display.place(x=80, y=180)
# WPM DISPLAY #
wpm_heading = Label(type_window,
text="Your WPM :",
font=('arial', 25, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
wpm_heading.place(x=100, y=450)
global wpm_count
wpm_count = Label(type_window,
text=wpm,
font=('arial', 25, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
wpm_count.place(x=100, y=500)
# TIME COUNTDOWN DISPLAY #
timer = Label(type_window,
text='Time Left :',
font=('arial', 35, 'italic bold'),
bg="SkyBlue4",
fg="PaleTurquoise1")
timer.place(x=900, y=100)