From fd5f57ba5523675ba3155e467ccb02b550f9f4e5 Mon Sep 17 00:00:00 2001 From: Jeet-Ui03 Date: Tue, 28 Oct 2025 18:51:28 +0530 Subject: [PATCH 1/5] Add jeet_issue_21 --- jeet_issue_21.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 jeet_issue_21.py diff --git a/jeet_issue_21.py b/jeet_issue_21.py new file mode 100644 index 0000000..1a6e6c6 --- /dev/null +++ b/jeet_issue_21.py @@ -0,0 +1,46 @@ +# Temperature Converter + +def celsius_to_fahrenheit(c): + return (c * 9/5) + 32 + +def fahrenheit_to_celsius(f): + return (f - 32) * 5/9 + +def celsius_to_kelvin(c): + return c + 273.15 + +def kelvin_to_celsius(k): + return k - 273.15 + +def fahrenheit_to_kelvin(f): + return (f - 32) * 5/9 + 273.15 + +def kelvin_to_fahrenheit(k): + return (k - 273.15) * 9/5 + 32 + + +print("=== Temperature Converter ===") +print("1. Celsius to Fahrenheit") +print("2. Fahrenheit to Celsius") +print("3. Celsius to Kelvin") +print("4. Kelvin to Celsius") +print("5. Fahrenheit to Kelvin") +print("6. Kelvin to Fahrenheit") + +choice = int(input("\nEnter your choice (1-6): ")) +temp = float(input("Enter temperature value: ")) + +if choice == 1: + print(f"{temp}°C = {celsius_to_fahrenheit(temp):.2f}°F") +elif choice == 2: + print(f"{temp}°F = {fahrenheit_to_celsius(temp):.2f}°C") +elif choice == 3: + print(f"{temp}°C = {celsius_to_kelvin(temp):.2f} K") +elif choice == 4: + print(f"{temp} K = {kelvin_to_celsius(temp):.2f}°C") +elif choice == 5: + print(f"{temp}°F = {fahrenheit_to_kelvin(temp):.2f} K") +elif choice == 6: + print(f"{temp} K = {kelvin_to_fahrenheit(temp):.2f}°F") +else: + print("Invalid choice! Please select a number between 1 and 6.") From 7c0a0aef3322251f3a923fcf05fa51b41046cec7 Mon Sep 17 00:00:00 2001 From: Jeet-Ui03 Date: Wed, 5 Nov 2025 03:44:44 +0530 Subject: [PATCH 2/5] Add changes to Todo_List --- jeet.txt | 1 + jeet_issue_19.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 jeet_issue_19.py diff --git a/jeet.txt b/jeet.txt index e69de29..fcd6bcb 100644 --- a/jeet.txt +++ b/jeet.txt @@ -0,0 +1 @@ +jeet011@gmail.com \ No newline at end of file diff --git a/jeet_issue_19.py b/jeet_issue_19.py new file mode 100644 index 0000000..b22fa4f --- /dev/null +++ b/jeet_issue_19.py @@ -0,0 +1,9 @@ +# Leap Year Checker + +year = int(input("Enter a year: ")) + +# Leap year conditions +if (year % 400 == 0) or (year % 100 != 0 and year % 4 == 0): + print(f"{year} is a leap year.") +else: + print(f"{year} is not a leap year.") From 5a216cf78473eaca708317befcf992e2a34dac3f Mon Sep 17 00:00:00 2001 From: Jeet-Ui03 Date: Wed, 5 Nov 2025 04:17:40 +0530 Subject: [PATCH 3/5] Add jeet_isue_14 --- jeet_issue_14.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jeet_issue_14.py diff --git a/jeet_issue_14.py b/jeet_issue_14.py new file mode 100644 index 0000000..9ab01ff --- /dev/null +++ b/jeet_issue_14.py @@ -0,0 +1,19 @@ +import random + +print("🎯 Welcome to the Number Guessing Game! 🎯") + +# Generate a random number between 1 and 100 +number = random.randint(1, 100) +attempts = 0 + +while True: + guess = int(input("Enter your guess (1-100): ")) + attempts += 1 + + if guess < number: + print("📉 Too low! Try again.") + elif guess > number: + print("📈 Too high! Try again.") + else: + print(f"🎉 Congratulations! You guessed it in {attempts} attempts.") + break From 3f26758a2e2ebbef53cbdebeb51d7d3ca62d4ab5 Mon Sep 17 00:00:00 2001 From: Jeet-Ui03 Date: Wed, 5 Nov 2025 04:28:56 +0530 Subject: [PATCH 4/5] Add --- jeet_issue_07.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 jeet_issue_07.py diff --git a/jeet_issue_07.py b/jeet_issue_07.py new file mode 100644 index 0000000..c2b9ed8 --- /dev/null +++ b/jeet_issue_07.py @@ -0,0 +1,33 @@ +def binary_to_decimal(binary_str): + """Convert binary string to decimal integer""" + try: + return int(binary_str, 2) + except ValueError: + return "❌ Invalid binary number!" + + +def decimal_to_binary(decimal_num): + """Convert decimal integer to binary string""" + try: + return bin(int(decimal_num))[2:] # remove '0b' prefix + except ValueError: + return "❌ Invalid decimal number!" + + +# Main program +print("🔄 Binary ↔ Decimal Converter 🔄") +print("1️⃣ Binary → Decimal") +print("2️⃣ Decimal → Binary") + +choice = input("Enter your choice (1 or 2): ") + +if choice == '1': + binary = input("Enter a binary number: ") + print(f"Decimal: {binary_to_decimal(binary)}") + +elif choice == '2': + decimal = input("Enter a decimal number: ") + print(f"Binary: {decimal_to_binary(decimal)}") + +else: + print("❌ Invalid choice! Please enter 1 or 2.") From 0f670876d18add8f3fa7c993597c9b6f310ac15e Mon Sep 17 00:00:00 2001 From: Jeet-Ui03 Date: Wed, 5 Nov 2025 04:39:34 +0530 Subject: [PATCH 5/5] add --- jeet_issue_10.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 jeet_issue_10.py diff --git a/jeet_issue_10.py b/jeet_issue_10.py new file mode 100644 index 0000000..93dd790 --- /dev/null +++ b/jeet_issue_10.py @@ -0,0 +1,23 @@ +import os + +# 🔧 Set the directory path +folder_path = input("Enter the folder path: ") + +# Check if path exists +if not os.path.exists(folder_path): + print("❌ Folder not found!") +else: + # List all files in the folder + files = os.listdir(folder_path) + print(f"Found {len(files)} files.") + + # Example: rename all files with new naming pattern + for count, filename in enumerate(files, start=1): + file_ext = os.path.splitext(filename)[1] # get file extension + new_name = f"file_{count}{file_ext}" # rename pattern + src = os.path.join(folder_path, filename) + dst = os.path.join(folder_path, new_name) + + os.rename(src, dst) + + print("✅ All files renamed successfully!")