Giter Site home page Giter Site logo

real0x0a1 / typechallenge Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2 KB

This Perl script is a simple typing speed game where users are prompted to type a randomly selected sentence as quickly as possible.

Perl 100.00%
perl perl-lang perl-language perl-programming perl-programming-language type-challenges

typechallenge's Introduction

Typing Speed Game

A simple command-line game to test your typing speed.

Prerequisites

Make sure you have Perl installed on your machine. You can check by running the following command:

perl -v

If Perl is not installed, you can download it from the official Perl website: https://www.perl.org/

How to Run

  1. Clone this repository or download the TypeChallenge.pl file.
  2. Open a terminal and navigate to the directory where the TypeChallenge.pl file is located.
  3. Run the following command:
perl TypeChallenge.pl
  1. Follow the instructions on the screen to play the game.
  2. Enjoy!

Game Instructions

  1. Random sentences will be displayed on the screen.
  2. Your task is to type the displayed sentence as quickly as possible.
  3. Press Enter when you are ready to start typing.
  4. The timer starts once you start typing.
  5. After you finish typing, the program will tell you how long it took to type the sentence and your typing speed in characters per minute.
  6. If your input matches the sentence, you will receive a congratulations message. Otherwise, you will be informed that your input doesn't match the sentence.
  7. You can play the game as many times as you want.
  8. To exit the game, type n when prompted to play again.

Sample Gameplay

Welcome to the Typing Speed Game!

Type the following sentence as quickly as possible:
The quick brown fox jumps over the lazy dog.

Press Enter when ready...
Type the sentence: The quick brown fox jumps over the lazy dog.
Congratulations! You typed it correctly.
Time taken: 3.567 seconds
Typing speed: 17 characters per minute

Play again (y/n): y

Type the following sentence as quickly as possible:
Sphinx of black quartz, judge my vow.

Press Enter when ready...
Type the sentence: Sphinx of black quart, judge my vow.
Oops! Your input doesn't match the sentence.

Play again (y/n): n

Thanks for playing!

Author

  • Ali (Real0x0a1)

typechallenge's People

Contributors

real0x0a1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.