Class 12 Python Project Typing
Class 12 Python Project Typing
Class 12 Python Project Typing
ERODE-638011
DEVELOPED BY:
B.GAURAV RAJPUROHIT
(Register No :)
1
NANDHA CENTRAL CITY SCHOOL [CBSE]
ERODE-638011
CERTIFICATE
This is to certify that B.GAURAV RAJPUROHIT. of class XII commerce of
Nandha Central City School has successfully completed the Computer Science
project entitled “TYPING SPEED TEST” for the partial fulfillment of
AISSCE as prescribed by CBSE in the year 2022-23.
2
ACKNOWLEDGEMENT
First and foremost I praise and thank almighty from the depth of my
heart, which has been the source of strength in the completion of my
project.
I also thank my Parents for their motivation & support. I must thank my
classmates for their timely help and support for completion of this
project.
Last but not least, I would like to thank all those who had helped
directly or indirectly towards the completion of this project.
3
INDEX
1. Problem Definition 6
2. Problem Analysis 8
5. Source Code 13
6. Output 16
7. Bibliography 21
4
CONTENTS
Problem Definition
Problem Analysis
Source Code
Output
Bibliography
5
PROBLEM DEFINITION:
Typing Fast and Accurate can be difficult. It’s becoming more and more
common for students to take notes on computers in college and even in
high school. And it makes sense. A proficient typist can record down
ideas much faster than anyone can write by hand.
6
MEMBER FUNCTION USED IN APPLICATION:
load_text(): It will load the random texts, from the text while .
wpm_test(): It will calculate the WPM, and accuracy of the user. It will
calculate WPM by calculating no.of characters typed by 5.
main() :This function will get the input from the user and will be typed
in the box.
7
PROBLEM ANALYSIS:
# Software:
9
Enables You to Focus on Your Ideas:
Hunt and peck typing takes a lot more thought and attention than touch
typing.
In fact, touch typists don’t even need to think about where the keys are
for a second. The muscle memory in their fingers helps them type with
ease.
This means that touch typists can put all of their thought and attention on
the work at hand. Whether it’s writing an email, rap lyrics, or an
important memo, mastering typing means you can spend your mental
energy where it’s most needed.
One thing kids love to do? Chat with their friends. And increasingly,
digital communication is becoming a huge part of how students
communicate.
Working on your WPM will ensure that when you land your dream job
your slow typing skills won’t hold you back from meeting your full
potential.
Before you can rock at your dream job, though, you have to land it. And
tough but true, how one types is often seen as an indicator of
intelligence.
11
If your resume is riddled with careless typing errors, or if the process of
writing an email is a laborious task, chances are you won’t get hired in
the first place.
12
SOURCE CODE:
import cursor
from cursor import wrapper
import time
import random
def start_screen(stdscr):
stdscr.clear()
stdscr.addstr("Welcome to the Speed Typing Test!")
stdscr.addstr("\nPress any key to begin!")
stdscr.refresh()
stdscr.getkey()
def load_text():
with open("text.txt", "r") as f:
lines = f.readlines()
13
return random.choice(lines).strip()
def wpm_test(stdscr):
target_text = load_text()
current_text = []
wpm = 0
start_time = time.time()
stdscr.nodelay(True)
while True:
time_elapsed = max(time.time() - start_time, 1)
wpm = round((len(current_text) / (time_elapsed / 60)) /
5)
stdscr.clear()
display_text(stdscr, target_text, current_text, wpm)
stdscr.refresh()
if "".join(current_text) == target_text:
stdscr.nodelay(False)
break
try:
key = stdscr.getkey()
except:
continue
if ord(key) == 27:
break
14
if key in ("KEY_BACKSPACE", '\b', "\x7f"):
if len(current_text) > 0:
current_text.pop()
elif len(current_text) < len(target_text):
current_text.append(key)
def main(stdscr):
curses.init_pair(1, curses.COLOR_GREEN,
curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_RED,
curses.COLOR_BLACK)
curses.init_pair(3, curses.COLOR_WHITE,
curses.COLOR_BLACK)
start_screen(stdscr)
while True:
wpm_test(stdscr)
stdscr.addstr(2, 0, "You completed the text! Press any
key to continue...")
key = stdscr.getkey()
if ord(key) == 27:
break
wrapper(main)
OUTPUT:
15
16
17
18
19
20
BIBLIOGRAPHY:
21