diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..81eac8d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,15 @@ +# These are supported funding model platforms + +github: # [Rpnit049, ronitraj74] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: # Replace with a single Buy Me a Coffee username +thanks_dev: # Replace with a single thanks.dev username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/Digital CLock by python/main.py b/Digital CLock by python/main.py new file mode 100644 index 0000000..428d543 --- /dev/null +++ b/Digital CLock by python/main.py @@ -0,0 +1,16 @@ +import tkinter as tk +from time import strftime + +root = tk.Tk() +root.title("Digital Clock") + +def time(): + string = strftime('%H:%M:%S %p \n %D') + label.config(text=string) + label.after(1000,time) +label = tk.Label(root, font=('calibri',50,'bold'), background='yellow',foreground='black') +label.pack(anchor='center') + +time() + +root.mainloop() \ No newline at end of file diff --git a/File Management App/app1.py b/File Management App/app1.py new file mode 100644 index 0000000..7d6f4d4 --- /dev/null +++ b/File Management App/app1.py @@ -0,0 +1,90 @@ +import os + +def create_file(filename): + try: + with open(filename, 'x') as f: + print(f"File name {filename}: Created successfully!") + except FileExistsError: + print(f'File name {filename} already exists!') + except Exception as e: + print('An error occurred!') + +def view_all_file(): + files = os.listdir() + if not files: + print('No file found!') + else: + print('Files in directory:') + for file in files: + print(file) + +def delete_file(filename): + try: + os.remove(filename) + print(f'{filename} has been deleted successfully!') + except FileNotFoundError: + print('File not found!') + except Exception as e: + print('An error occurred!') + +def read_file(filename): + try: + with open(filename, 'r') as f: + content = f.read() + print(f"Content of '{filename}':\n{content}") + except FileNotFoundError: + print(f"{filename} doesn't exist!") + except Exception as e: + print('An error occurred!') + +def edit_file(filename): + try: + with open(filename,'a') as f: + content = input("Enter data to add = ") + f.write(content + "\n") + print(f'Content added to {filename} Successfully!') + except FileNotFoundError: + print(f"{filename} doesn't exist!") + except Exception as e: + print('An error occurred!') + +def main(): + while True: + print("\nFILE MANAGEMENT APP") + print('1: Create file') + print('2: View all files') + print('3: Delete file') + print('4: Read file') + print('5: Edit file') + print('6: Exit') + + choice = input('Enter your choice (1-6) = ') + + if choice == '1': + filename = input("Enter file name to create = ") + create_file(filename) + + elif choice == '2': + view_all_file() + + elif choice == '3': + filename = input("Enter file name you want to delete = ") + delete_file(filename) + + elif choice =='4': + filename = input("Enter file name to read = ") + read_file(filename) + + elif choice == '5': + filename = input("Enter file name to edit = ") + edit_file(filename) + + elif choice == '6': + print('Closing the app....') + break + + else: + print('Invalid choice!') + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/File Management App/sample.txt b/File Management App/sample.txt new file mode 100644 index 0000000..e69de29 diff --git a/FizzBuzz/fizzbuzz.py b/FizzBuzz/fizzbuzz.py new file mode 100644 index 0000000..cd6de86 --- /dev/null +++ b/FizzBuzz/fizzbuzz.py @@ -0,0 +1,18 @@ +'''number divisible by 3 and 5 both is fizzbuz; + number divisible by 3 is fizz; + number divisible by 5 is buzz; +''' + +def fizzbuzz(): + n = int(input("Enter the number to print fizz buzz:")) + for i in range (1 , n+1): + if i % 3 == 0 and i % 5 ==0: + print("fizzbuzz") + elif i % 3 == 0 : + print("fizz") + elif i % 5 ==0: + print("buzz") + else: + print(i) + +fizzbuzz() \ No newline at end of file diff --git a/Python QRCode project/main.py b/Python QRCode project/main.py new file mode 100644 index 0000000..08040b1 --- /dev/null +++ b/Python QRCode project/main.py @@ -0,0 +1,12 @@ +import qrcode + +url = input("Enter the URL here: ").strip() +file_path = "C:\\Users\\iamro\\OneDrive\\Documents\\Desktop\\qrcode.png" + +qr = qrcode.QRCode() +qr.add_data(url) + +img = qr.make_image() +img.save(file_path) + +print("QR Code was generated!") \ No newline at end of file diff --git a/README.md b/README.md index 9140d59..3b22747 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,54 @@ -๐Ÿ‘‹ Hi, I'm Ronit Raj -๐Ÿ Python Developer | Competitive Programmer | Problem Solver +# ๐Ÿ‘‹ Hi, I'm Ronit Raj -I am a dedicated Python learner focused on building strong foundations in programming, data structures, and algorithmic problem-solving. -This repository represents my complete coding journey โ€” from basic Python programs to competitive programming solutions and future advanced projects. -*** -๐Ÿš€ About This Repository +๐Ÿ Python Developer | Competitive Programmer | Problem Solver -This repository is a structured collection of: - -๐Ÿ Core Python fundamentals - -๐Ÿ” Loops, conditions, and functions +I am a dedicated Python learner focused on building strong foundations in programming, data structures, and algorithmic problem-solving. This repository represents my complete coding journey โ€” from basic Python programs to competitive programming solutions and future advanced projects. -๐Ÿง  Object-Oriented Programming (OOP) +--- -๐Ÿ“Š Data Structures & Algorithms +## ๐Ÿš€ About This Repository -๐Ÿ† Competitive programming solutions - -๐Ÿงช Practice test implementations +This repository is a structured collection of: -๐Ÿš€ Mini projects and experiments +- ๐Ÿ Core Python fundamentals +- ๐Ÿ” Loops, conditions, and functions +- ๐Ÿง  Object-Oriented Programming (OOP) +- ๐Ÿ“Š Data Structures & Algorithms +- ๐Ÿ† Competitive programming solutions +- ๐Ÿงช Practice test implementations +- ๐Ÿš€ Mini projects and experiments It serves as a personal archive of growth, consistency, and continuous improvement. -*** -๐Ÿ† Competitive Programming - -I actively solve coding problems to improve speed, logic, and optimization skills. - -๐Ÿ”ฅ Practice problems and contests on CodeChef - -๐Ÿ’ก Algorithm and data structure challenges on HackerRank - -Through competitive programming, I focus on: - -Writing efficient and optimized solutions - -Understanding edge cases -Improving time and space complexity +--- -Preparing for technical interviews +## ๐Ÿ† Competitive Programming -๐Ÿ›  Skills & Technologies +I actively solve coding problems to improve speed, logic, and optimization skills. -Python (Core & Advanced Concepts) +- ๐Ÿ”ฅ Practice problems and contests on CodeChef +- ๐Ÿ’ก Algorithm and data structure challenges on HackerRank -Data Structures +### Focus Areas: +- Writing efficient and optimized solutions +- Understanding edge cases +- Improving time and space complexity +- Preparing for technical interviews -Algorithms +--- -Problem Solving +## ๐Ÿ›  Skills & Technologies -Competitive Programming +- Python (Core & Advanced Concepts) +- Data Structures +- Algorithms +- Problem Solving +- Competitive Programming +- Logical Thinking & Debugging -Logical Thinking & Debugging +--- -๐Ÿ“ Repository Structure +## ๐Ÿ“ Repository Structure /Basic_Python /Control_Statements /Functions @@ -68,30 +60,37 @@ Logical Thinking & Debugging /Practice_Tests /Projects + The structure will continue to evolve as I explore more advanced topics. -*** -๐Ÿ“ˆ Current Focus -Strengthening DSA concepts +--- + +## ๐Ÿ“ˆ Current Focus -Improving competitive programming performance +- Strengthening DSA concepts +- Improving competitive programming performance +- Writing cleaner and more optimized Python code +- Building real-world Python projects -Writing cleaner and more optimized Python code +--- -Building real-world Python projects -*** -๐ŸŽฏ Long-Term Goal +## ๐ŸŽฏ Long-Term Goal To become a highly skilled software developer with strong problem-solving abilities and deep understanding of algorithms and system design. -*** -๐Ÿ“Œ Philosophy - -Consistency builds mastery. -Every line of code is progress. -*** -๐Ÿ“ฌ Connect With Me - [๐Ÿ† CodeChef](https://www.codechef.com/users/its_rsr04) - - [๐Ÿ’ก HackerRank](https://www.hackerrank.com/profile/ronitrajrsr0409) - *** - โญ This repository grows as I grow. + +--- + +## ๐Ÿ“Œ Philosophy + +> **Consistency builds mastery. Every line of code is progress.** + +--- + +## ๐Ÿ“ฌ Connect With Me + +- ๐Ÿ† CodeChef +- ๐Ÿ’ก HackerRank + +--- + +โญ This repository grows as I grow. diff --git a/Tic Tac Toe Game in python/main.py b/Tic Tac Toe Game in python/main.py new file mode 100644 index 0000000..4db5f35 --- /dev/null +++ b/Tic Tac Toe Game in python/main.py @@ -0,0 +1,3 @@ +import tkinter as tk +from tkinter import messagebox + diff --git a/codechef/01_practice.py b/codechef/01_practice.py new file mode 100644 index 0000000..80cf5c4 --- /dev/null +++ b/codechef/01_practice.py @@ -0,0 +1,32 @@ +# cook your dish here +# n = 5 +# for i in range(1,n+1): +# for j in range(1,i+1): +# print("*",end="") +# print() +# print("code","chef") +# print(5 5) +# print(8) +# print(5,end="") +# print(7) +# print("Hello","world",5,"endl",2) +# print("Hello") +# print(" World") +# print(1,2,3,4,5) +# print("1 2 3 4 5") +# n = 5 +# for i in range(1,n+1): +# print(f"{i} - {i*i}") +# cook your dish here +# n = 5 +# for i in range(1,n+1): +# print(f"{i}" - "{i*i}") +# n = 5 +# for i in range(n): +# for j in range(i): +# print("*",end="") +# print() +for i in range(4): + for j in range(5): + print("*",end="") + print() \ No newline at end of file diff --git a/practice question/01_star_question.py b/practice question/01_star_question.py new file mode 100644 index 0000000..43f1f3d --- /dev/null +++ b/practice question/01_star_question.py @@ -0,0 +1,12 @@ +''' +Q1. print this pattern + * * * * * + * * * * * + * * * * * + * * * * * + * * * * * +''' +for i in range(1,6): + for j in range(1,6): + print("*",end=" ") + print() diff --git a/practice question/02_star_question.py b/practice question/02_star_question.py new file mode 100644 index 0000000..b195288 --- /dev/null +++ b/practice question/02_star_question.py @@ -0,0 +1,13 @@ +''' +Q1. print this pattern + * + * * + * * * + * * * * + * * * * * +''' +r = int(input("Enter the number of rows ro print right angle triangle :")) +for i in range (1, r+1): + for j in range (1, i+1): + print("*", end=" ") + print() \ No newline at end of file diff --git a/practice question/03_star_practice.py b/practice question/03_star_practice.py new file mode 100644 index 0000000..cfda915 --- /dev/null +++ b/practice question/03_star_practice.py @@ -0,0 +1,13 @@ +''' +Q3. print this pattern + * * * * * + * * * * + * * * + * * + * +''' +r = int(input("Enter the number of rows to print reverse triangle : ")) +for i in range(r,0,-1): + for j in range(i): + print("*",end=" ") + print() \ No newline at end of file diff --git a/practice question/04_star_practice.py b/practice question/04_star_practice.py new file mode 100644 index 0000000..a7969b1 --- /dev/null +++ b/practice question/04_star_practice.py @@ -0,0 +1,14 @@ +''' +Docstring for practice question.04_star_practice +1 +1 2 +1 2 3 +1 2 3 4 +1 2 3 4 5 +''' +r = int(input("Enter the number of rows to print numerical triangle : ")) +for i in range(1 , r+1): + for j in range(1 , i+1): + print(j, end=" ") + print() + \ No newline at end of file diff --git a/practice question/05_star_question.py b/practice question/05_star_question.py new file mode 100644 index 0000000..d12085d --- /dev/null +++ b/practice question/05_star_question.py @@ -0,0 +1,20 @@ +''' +Docstring for practice question.05_star_question +5 4 3 2 1 +4 3 2 1 +3 2 1 +2 1 +1 +''' +r = 5 +for i in range (r,0,-1): + for j in range(i,0,-1): + print(j, end=" ") + print() + + + r = 5 +for i in range (r,0,-1): + for j in range(i): + print(j, end=" ") + print() \ No newline at end of file diff --git a/practice question/06_star_question.py b/practice question/06_star_question.py new file mode 100644 index 0000000..520ecc6 --- /dev/null +++ b/practice question/06_star_question.py @@ -0,0 +1,20 @@ +''' +Docstring for practice question.06_star_question + * + * * * + * * * * * + * * * * * * * + * * * * * * * * * +''' +rows = 5 + +for i in range(rows): + # Print spaces + for j in range(rows - i - 1): + print(" ", end="") + + # Print stars + for k in range(2 * i + 1): + print("*", end=" ") + + print() diff --git a/practice question/07_star_practice.py b/practice question/07_star_practice.py new file mode 100644 index 0000000..e69de29 diff --git a/project/main.py.py b/project/main.py.py new file mode 100644 index 0000000..1920a47 --- /dev/null +++ b/project/main.py.py @@ -0,0 +1,33 @@ +''' +Docstring for projrct.01_project +Here, + 1 = snake + 2 = Water + 3 = gun +''' +import random +computer = random.choice([1,2,3]) +print("s for snake, \nw for Water \ng for gun") +youstr = input("Enter your choice : ") +youDict = {"s" : 1, "w" : 2, "g" : 3} +reverseDict = {1 : "snake", 2 : "water" , 3 : "gun"} + +you = youDict[youstr] +print(f"you Choose {reverseDict[you]} \n and Computer Choose {reverseDict[computer]}") +if (computer == you): + print("Game is Draw :) ") +else: + if(computer == 2 and you == 1): + print("You win!") + elif(computer == 2 and you == 3): + print("You lose!") + elif(computer == 1 and you == 2): + print("You lose!") + elif(computer == 1 and you == 3): + print("You Win!") + elif(computer == 3 and you == 2): + print("You Win!") + elif(computer == 3 and you == 1): + print("You lose!") + else: + print("Somethings went worng") \ No newline at end of file