Skip to content

This Python application mimics the action of an hourglass.

Notifications You must be signed in to change notification settings

xzebcex/Hourglass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Hourglass

Description

This Python application mimics the action of an hourglass. Sand and walls are created with ASCII characters. When the sand drops through the hourglass form, it gets narrower.

Table of Contents

  1. Installing and Running
  2. How to Use
  3. License
  4. How to Contribute
  5. Additional Points
  6. Conclusion

Installing and Running

You must have Python3 installed on your system in order to use this code. You can carry out the following steps to execute the program:

  1. Copy or download the hourglass.py file.
  2. Launch a command prompt or terminal and go to the directory where the file is kept.
  3. Execute the python3 hourglass.py program.

How to Use

An hourglass will show up on the screen once you launch the script. The sand will instantly begin to fall. As long as you don't press Ctrl-C to end the application, it will keep running.

License

The MIT License applies to this program.

How to Contribute

Please do the following actions if you would want to contribute to this program:

  1. Fork the repository on GitHub.
  2. Make your changes to the code.
  3. Submit a pull request.

Additional Points

By modifying the PAUSE LENGTH constant at the file's top, you may alter how quickly the sand is falling. The WIDE FALL CHANCE constant can be used to change the likelihood of the sand falling wider. The application makes use of the "bext" module to output colors to the console and control the cursor. This program was written in Python3.

Conclusion

This script is an entertaining way to view a straightforward hourglass simulation. You are welcome to change and enhance the code as you see appropriate!

About

This Python application mimics the action of an hourglass.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages