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/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/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