Python Learning Project
This repository contains assignments designed to improve Python programming skills across various fundamental topics. Each theme explores a different set of concepts with real-world use cases. Below is an overview of the six themes covered in this project. Theme 1: Basic Variable Assignment
This theme focuses on the fundamental concepts of Python variables, basic input/output, and simple arithmetic operations. The tasks introduce how to work with different data types, from integers to strings. Tasks:
Task 1: Assign values to variables like pii and print them.
Task 2: Capture user input for first and last names, then output them together.
Task 3: Request two numbers from the user and print their sum, difference, and product.
Task 4: Read height, weight, and compute BMI.
Task 5: Calculate the perimeter and area of a circle from a given diameter.
Theme 2: Control Flow
In this theme, users learn about conditional statements, loops, and simple control flows. The tasks focus on making decisions within the code and performing repeated operations using loops. Tasks:
Task 1: Get two numbers and print the larger one.
Task 2: Validate user-input for a grade and provide feedback.
Task 3: Output growing number pairs using loops.
Task 4: A circle calculator that allows different operations based on user input.
Task 5: Toimeentulotuki calculator to compute financial aid based on specific criteria.
Theme 3: Lists and Loops
This theme focuses on lists, how to manipulate them using loops, and simple arithmetic operations. The tasks require working with lists, random numbers, and sorting algorithms. Tasks:
Task 1: Read 5 integers, print their sum and average.
Task 2: Generate random even numbers and find the largest/smallest in the list.
Task 3: Rainfall measurement system based on weekdays in two languages.
Task 4: Random float generation and file I/O, including reading and sorting from files.
Task 5: Create a vertical descending name pattern with spaces.
Theme 4: Functions and Dictionaries
This theme introduces custom functions, lambda expressions, and dictionary operations in Python. The goal is to teach users how to organize and retrieve data more efficiently. Tasks:
Task 1: Write a function to check whether a number is positive, negative, or zero.
Task 2: Create a dictionary for student grades and handle errors in input.
Task 3: Calculate ski jumping scores based on user input and predefined rules.
Task 4: A function that handles unlimited parameters, with special cases for teachers and students.
Task 5: A car registration system using a dictionary and file operations.
Theme 5: Classes and Object-Oriented Programming (OOP)
This theme covers object-oriented programming concepts, including classes, attributes, methods, inheritance, and polymorphism. Tasks:
Task 1: Create a Havainto class to store bird observation data.
Task 2: Develop a stock value calculator using the Osake class.
Task 3: Handle SMS messages using the Tekstiviesti and SMSUtils classes.
Task 4: Design a product management system using inheritance to manage different product types.
Task 5: Manage a vintage car collection with the CarStorage, Car, and Service classes.
Theme 6: Functional Programming and Libraries
This theme introduces functional programming concepts and the use of external libraries like NumPy and Pandas. Tasks:
Task 1: Create lambda functions for summation and multiplication and use them with custom functions.
Task 2: Implement a class for managing orders, including reading and writing to JSON files.
Task 3: Use the NumPy library to demonstrate array operations.
Task 4: Use the Pandas library to demonstrate data analysis.
Task 5: Fix a function that returns a specific string.
Install necessary libraries (if not already installed): pip install numpy pandas
Contributing
Feel free to fork this repository and submit pull requests if you'd like to improve the code or add new exercises!
License
This project is open-source and available under the MIT License.