GithubHelp home page GithubHelp logo

hourglass's Introduction

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!

hourglass's People

Contributors

xzebcex 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.