From cc8cc9ee0f27c7e0d84f57552835fde0e12741a6 Mon Sep 17 00:00:00 2001 From: Faisal <154563439+neverfriendme@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:13:20 -0400 Subject: [PATCH] New file --- Files/Probability.py | 15 +++++++++++++++ Files/reader.py | 38 -------------------------------------- Javascript.html | 12 ++++++++++++ Python.html | 3 ++- 4 files changed, 29 insertions(+), 39 deletions(-) create mode 100644 Files/Probability.py delete mode 100644 Files/reader.py diff --git a/Files/Probability.py b/Files/Probability.py new file mode 100644 index 0000000..0996c89 --- /dev/null +++ b/Files/Probability.py @@ -0,0 +1,15 @@ +from random import randrange +import time +# by neverfriendme +def probability(): + try: + Range = int(input("Range: 1 now enter your number:\n")) + if 1 == 1: + while True: + generate = randrange(1,Range) + time.sleep(1) + print(generate) + except ValueError: + print("Invalid Value") + return ValueError +probability() \ No newline at end of file diff --git a/Files/reader.py b/Files/reader.py deleted file mode 100644 index 9744728..0000000 --- a/Files/reader.py +++ /dev/null @@ -1,38 +0,0 @@ -import pathlib - -def func(): - extensions = (".cpp", ".hpp", ".h", ".cxx", ".hxx", ".py", ".pyc", ".pyd", ".pyo", ".pyw", ".pyx", ".pxd", ".pxi", ".pyzw", ".js", ".C", ".c") - choices = ["read", "quit"] - - while True: - choice = input("read to read the contents of a file or quit:\n").strip().lower() - if choice not in choices: - print("Invalid input. Please try again.") - continue - - if choice == "quit": - print("Quiting") - return - - directory = input("What is the file you want to open (Please input the directory correctly):\n") - file_path = pathlib.Path(directory) - - if not file_path.suffix in extensions: - warning = input("Are you sure? The file you are entering could contain malware.Y/N:").strip().upper() - if warning != "Y": - print("Quiting for your safety") - return - - try: - text = file_path.read_text() - print(text) - except FileNotFoundError: - print(f"File '{directory}' not found") - except PermissionError: - print(f"Permission denied for file '{directory}'") - except IOError as e: - print(f"Error reading file '{directory}': {e}") - except Exception as e: - print(f"An unexpected error occurred: {e}") - -func() diff --git a/Javascript.html b/Javascript.html index 4814af5..445a970 100644 --- a/Javascript.html +++ b/Javascript.html @@ -1,6 +1,11 @@ + @@ -15,6 +20,13 @@

Javascript templates

Try basic prompt calculator now! Try template.js now! template.js +
Javascript files need to be copied and pasted , why? For your safety of course.
+ diff --git a/Python.html b/Python.html index 76d7e10..95dbee0 100644 --- a/Python.html +++ b/Python.html @@ -14,7 +14,8 @@

Python templates

Basic Terminal Calculator Minutes to hours Speed - reader + Probability Shape-maker version 5 +
Be careful when downloading a python file. Do you need it? Is it malicous?