Welcome to the Python Weekly Assignments repository! This repository contains a collection of weekly Python assignments, each designed to enhance your programming skills and understanding of various Python concepts. The assignments are categorized by week, with each week featuring five unique programming challenges.
This repository is aimed at students and Python enthusiasts who are looking to practice and improve their Python programming skills. Each week's assignments cover a range of topics and challenges, from basic data types and control structures to more advanced concepts like file handling and machine learning.
- To print the last digit.
- Print the second last digit
- Exchange the last two digits
- Find product after exchaning last digits
- Print the sum of last two digits
- Questions
- Find the Area of a Triangle
- To calculate simple interest
- To calculate compound interest
- Find the distance between two points
- To find the slope of a line
- Questions
- To check if a character is a vowel or a consonant
- To find the largest number
- To find the smallest number
- To check eligibility for vote
- To find the volume of a cone
- Questions
- To exchange the last and third last digit
- To double the last digit
- To insert 1 after decimal
- To insert 1 before decimal
- To find the first digit after decimal
- Questions
- Printing on specific condition
- To check if A is 90° (in a ▲)
- Deciding grade of a student
- Printing on specific condition - 2
- To print the centre and radius of a circle.
- Questions
- To print the point of intersection between two lines
- Print ∠A in a ▲
- Prints the distance between a point and a line
- Printing roots of quadratic equations.
- To check if a line is vertical or not (Also prints slope)
- Questions
- To reverse the digits
- To print Sum of digits
- To check Palindrome
- To print Fibonacci series in a given range
- To calculate Factorial
- Questions
- To find exponential without 'pow'
- To print numbers from 1 to 10 using 'while'
- To print numbers divisible by 5 and 7 uptil 50 using 'while'
- To check whether a given number is Armstrong number
- To check whether a given nymber is Krishnamurthy/Peterson number
- Questions
- 1 + 3 + 5 + 7 +.... (last term should be user input)
- 1 - 2 + 3 - 4 +.... (last term should be user input)
- 1/2 + 1/4 + 1/6 + 1/8 +.... (last term should be user input)
- 1/2 + 2/3 + 3/4 +...
- 1/3 + 3/5 + 5/7 +....
- Questions
- To create a multiplication table of 5 (till the given term)
- To print in reverse order
- To print even and odd numbers in a specified range
- To calculate factorial (using for loop)
- To count the total characters (except spaces)
- Questions
- To calculate the sum of 'N' natural numbers
- To count the number of digits in a number.
- To find the length of a string without using 'len()'
- To count the number of vowels in a string
- To concatenate two strings
- Questions
- To find the GCD of two user given inputs
- To find the LCM of two user given inputs
- To check if a character is a Vowel or a Consonant
- To check whether a number is divisible by both 7 and 11
- To count the number of words in a string
- Questions
- 1 2 3 4 5 6 7 8 9 10...
- 2 4 6 8 10 12 14 16 18 20...
- 0 5 10 15 20 25 30 35 40 45...
- 3 6 9 12 15 18 21 24 27 30...
- 10 11 12 13 14 15 16 17 18 19...
- Questions
- -5 -1 3 7 11 15 19 23 27 31...
- 7 5 3 1 -1 -3 -5 -7 -9 -11...
- 50 45 40 35 30 25 20 15 10 5...
- 100 90 80 70 60 50 40 30 20 10...
- 5 5 5 5 5 5 5 5 5 5...
- Questions
- 1 8 27 64 125 216 343 512 729 1000...
- 0 1 2 5 12 29 70 169 408 985..... (Pell Numbers Series)
- 1 1 2 5 14 42 132 429 1430 4862.....(Catalan Numbers Series)
- 1 1/2 1/3 1/4 1/5 1/6 1/7......(Harmonic Series)
- 2 1 3 4 7 11 18 29 47 76........(Lucas Numbers Series)
- Questions
- To generate the series: 2, 15, 41, 80, 132, 197…
- To generate the series: 1, 3, 4, 8, 15, 27, 50…
- To generate the series: 1, 9, 17, 33, 49, 73, 97…
- To generate the alternating series: 2, 1, 4, 3, 6, 5…
- To generate the series: 5, 12, 21, 32, 45…
- Questions
- Summation of the series: -1 + 2 + 11 + 26 + 47…
- Summation of the series: 1 + 2 + 2 + 3 + 3 + 3 + 4 + 4 + 4 + 4…
- Series involving powers: 1^(2^3) + 2^(3^4) + 3^(4^5) + 4^(5^6)…
- Fractional series: 1 + 1/2^2 + 1/3^3 + 1/4^4…
- Factorial-based series: 1/1! + 2/2! + 3/3! + 4/4!…
- Questions
- Nested summation series: 1 + (1+4) + (1+4+4^2) + (1+4+4^2+4^3)…
- Repeating digit series: 3 + 33 + 333 + 3333…
- Difference of cubes: (3^3 – 2^3) + (5^3 – 4^3) + (7^3 – 6^3)…
- Summation of squares: 1^2 + (1^2+2^2) + (1^2+2^2+3^2)…
- Fractional series: 1/(1×3) + 1/(3×5) + 1/(5×7)…
- Questions
- Fractional series: 0, 3/1, 8/3, 15/5…
- Progressive series: 3, 7, 13, 21, 31…
- Cubic growth series: 3, 20, 63, 144, 230…
- Quadratic series: 0, 5, 14, 27, 44…
- Mixed multiples series: 3, 6, 18, 24, 45, 54…
- Questions
- Descending Star Pattern
- Centered Star Pattern
- Increasing Star Pattern
- Mixed Star Pattern
- Number Pattern
- Questions
- Pattern 1 - Numbers in Increasing Order
- Pattern 2 - Numbers Decreasing in Rows
- Pattern 3 - Reverse Number Pyramid
- Pattern 4 - Inverted Numbers Pyramid
- Pattern 5 - Half-Diamond Shape with Numbers
- Questions
- Convert string to Uppercase
- Convert string to Lowercase
- Capitalize First Letter
- Capitalize First Letter of Each Word
- Count Occurrences of Substring
- Questions
- Find a Substring
- Replace a Substring
- Check if All Characters Are Alphabets
- Check if All Characters Are Digits
- Check if All Characters Are Alphanumeric
- Questions
- Split a String into a List of Words
- Join a List of Strings into a Single String
- Check if a String Starts with a Substring
- Check if a String Ends with a Substring
- Find the Position of the First Occurrence of a Substring
- Questions
- Remove All White Spaces from a String
- Reverse Each Word in a String
- Find the Length of the Longest Word in a String
- Find the Length of the Smallest Word in a String
- Find the First Non-Repeating Character in a String
- Questions
- Add Three Numbers Using a User-Defined Function
- Calculate Factorial Using a User-Defined Function
- Calculate a to the Power b Without Using pow()
- Sum Using User-Defined Function: 1+2+3+...Nth Term
- Sum Using User-Defined Function: 1+3+5+...Nth Term
- Questions
- Series: 1, 4, 9, 16, 25, 36...
- Series: 2, 4, 8, 16, 32, 64...
- Series: 1, 3, 7, 13, 21, 31...
- Series: 1, 2, 6, 24, 120, 720...
- Series: 3, 10, 29, 66, 127, 218...
- Questions
- Check if a number is an Armstrong number
- Check if a number is a Krishnamurthy/Peterson/Strong number
- Check if a number is a palindrome
- Summation of series: 8, 88, 888, 8888... upto Nth term
- Generate Fibonacci series upto Nth term
- Questions
- Summation of N natural numbers using recursion
- Calculate the factorial using recursion
- Calculate (a^b) using recursion
- Check if a number is Armstrong using recursion
- Generate first N Fibonacci numbers using recursion
- Questions
Each assignment contains a PDF file that states the problem in a more detailed manner. Make sure to refer to it in case of any confusion.
To get started with the assignments, follow these steps:
- Clone the repository:
git clone https://github.com/CyberKnight-cmd/Python-Weekly-Assignments.git
- Navigate to the desired week's folder:
cd Python-Weekly-Assignments/Assignment1 - Run the Python programs:
python Prog1.py
Ensure you have Python installed on your machine. You can download it from here.
Contributions are welcome! If you have suggestions or improvements, please open an issue or submit a pull request. Here�s how you can contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Description of changes" - Push to the branch:
git push origin feature-name
- Create a new pull request.
This repository is licensed under the MIT License. See the LICENSE file for more information