🎯 Simple Tasks for Warm-up

Task 1: Even and Odd Numbers (5 p.)

Write a program that loops through the numbers from 1 to 20 and prints whether each number is even or odd.

1️⃣ Create a loop from 1 to 20. (2 p.)
2️⃣ Use an if-else statement to check even or odd. (2 p.)
3️⃣ Print each number with the label “even” or “odd”. (1 p.)


Task 2: Sum of Even Numbers (6 p.)

Write a program that calculates and prints the sum of all even numbers from 1 to 1000.

1️⃣ Create a loop from 1 to 1000. (2 p.)
2️⃣ Use a condition to select only even numbers. (2 p.)
3️⃣ Calculate and print the final sum. (2 p.)


Task 3: D3TD5T (12 p.)

Write a program that loops through a list (the list will be given next week).

1️⃣ (2 p.)
2️⃣ (1 p.)
3️⃣ (1 p.)
4️⃣ (3 p.)
5️⃣ (3 p.)
6️⃣ (1 p.)
7️⃣ (1 p.)


Task 4: Replace Characters (6 p.)

Write a program that goes through a list of fruits (the list will be given next week) and replaces all occurrences of a specific character (e.g., “a”) in each word with another character (e.g., “o”).

1️⃣ Read/ initialize the list of fruits. (1 p.)
2️⃣ Loop through each fruit and replace a character. (4 p.)
3️⃣ Print each modified fruit name. (1 p.)


Task 5: Remove and Add Friends with Loop and Replace (6 p.)

Write a program that:

1️⃣ (2 p.)
2️⃣ (2 p.)
3️⃣ (1 p.)
4️⃣ (1 p.)


🔍 Task 6: Search for a last name in a DataFrame (15 p.)

Description:

In this task, you will practice iterating over a DataFrame and stopping a search as soon as a condition is met. This time, you will search only by last name.

Preparation:

Steps:

1️⃣ (1 p.)
2️⃣ (1 p.)
3️⃣ (2 p.)
4️⃣ (6 p.) 5️⃣ (5 p.)

Task 7: 🎲 Game — “Lucky String Duel: You vs Computer” (15 p.)

Description:

In this advanced mini-game, you will play a “lucky string draw” duel against the computer!
Imagine you both have access to a magical bag containing 100 surprise words stored in a DataFrame.

You will receive this DataFrame next week.
Hint: Think carefully about how you access the word from the DataFrame!

DataFrame Structure:

Steps:

1️⃣ (1 p.)
2️⃣ (1 p.)
3️⃣ (4 p.)
4️⃣ (8 p.)
5️⃣ (1 p.)


Task 8: 🗺️ “Visualizing the Largest Cities in Europe Based on Coordinates” (15 p.)

Description:

You will work with the worldcities.csv file (SimpleMaps).

Instructions:

1️⃣ You will receive the download link to the World Cities dataset next week.
👉 Use the free version.

2️⃣ Unzip and note the path to worldcities.csv.

3️⃣ Load it into a pandas DataFrame and print all column names.

4️⃣ Filter cities in Europe using:

5️⃣ Print the city names from the filtered DataFrame.

6️⃣ Sort the DataFrame by population in descending order.

7️⃣ Create a bar chart (Matplotlib) for the top 10 largest cities:

1️⃣ (1 p.)
2️⃣ (1 p.)
3️⃣ (2 p.)
4️⃣ (4 p.)
5️⃣ (1 p.)
6️⃣ (2 p.)
7️⃣ (4 p.)


💡 Bonus Task: Object-Oriented Programming with Vehicles (15 p.)

Description:

Create a base class Vehicle with common attributes such as color, year, engine, name, and model.


Subclasses:


Data:


Steps:


1️⃣ Define the base class Vehicle with common attributes. (2 p.)
2️⃣ Define the subclass Car with extra attribute and method. (3 p.)
3️⃣ Define the subclass Truck with extra attribute and method. (3 p.)
4️⃣ Load both CSV files and create object lists. (3 p.)
5️⃣ Print total vehicle count and “VW” count. (2 p.)
6️⃣ Create a bar chart for vehicles older than 2000, with legend. (2 p.)


✅ Final p. Overview

Suggested grades

Instruction summary

  1. Please include a short description at the top of each script or function explaining what your code does and what is being calculated.
  2. Inside your code, write meaningful comments to describe each important step, logic, and variable updates.
  3. Clear comments help show your understanding, make your work easier to follow, and improve the overall quality of your code.
  4. 🚫 Do not copy any example code directly; always adapt it to your own logic and task requirements.

"""
Description:
This program solves Task X from the thesis assignment.

It includes:
- A loop that processes a sequence or list.
- A condition to check certain properties of elements (e.g., number properties or string checks).
- Printing or saving specific results based on conditions.

Please adjust this description to fit your specific task and explain clearly what is being calculated.
"""

# Example of a loop (replace with your actual loop)
for item in my_list:
    # Check a condition (replace with your actual condition)
    if some_condition:
        # Add a comment explaining what happens here
        pass
    else:
        # Another comment for alternative case
        pass

# Finally, print or return results with a clear explanation

💬 Note about comments

✍️ Good comments are rewarded!
For each task, you can receive an extra 0.5 points for clear, well-structured comments.
These points are not included in the main grade calculation, but they can help you if you are just below a grade boundary.

💡 For example: If you have 38 points (below passing level), but you wrote very good comments, you can receive enough extra points to pass (grade 4).

👉 So it is always worth it to write clear and meaningful comments!

💬 Note about the Bonus Task

The points you collect from the bonus task are not included in the main grade calculation.
However, if your total points are just below a higher grade level, I will count your bonus task points to help you reach the better grade.

It is completely your choice whether you want to try the bonus task or not — but it can be a great opportunity to improve your final result!