w3resource

Daily Coding Challenges & Projects


Wednesday


Frontend Mini Project Challenge

Vue.js Components

Challenge :

Create a Vue.js counter component that:

  • Displays a number.
  • Increments and decrements on button click.
  • Uses v-model and emits an event on change.

Bonus : Add support for minimum and maximum limits via props.

Try it Live : Vue SFC Playground

Backend Challenge

Python, PHP Focus

Python Task :

Write a Python function that returns the top 3 most frequent words in a given text file.

Hint : Use collections.Counter, open(), and split().


PHP Task :

Create a simple script that logs user login attempts into a MySQL database (IP address, timestamp).

Database Query Challenge

Problems on SQL - HR Database :

  1. Find the departments with more than 5 employees
  2. Get names of employees who have not received a salary change in 2 years

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem : Check if a string is a palindrome (ignore spaces and case).
    • Hint : Use lower() and compare with reversed string.
  • Medium:
    • Problem : Implement a basic LRU (Least Recently Used) Cache.
    • Hint : Use OrderedDict in Python or linked hashmap logic.
  • Hard:
    • Problem : Serialize and Deserialize a Binary Tree.
    • Hint : Use preorder traversal and special characters for nulls.

Bug of the Day

Language : Python & PHP

Python Bug

    Buggy Code:

    
    def divide(a, b):
        try:
            return a / b
        except:
            print("Error!")
    
    print(divide(10, 0))
    

What’s the bug? What will it print? Fix the logic to handle division by zero gracefully and return None.


PHP Bug

    Buggy Code:

    
    <?php
    $items = ["apple", "banana", "cherry"];
    foreach ($items as $i => $item)
        echo $item;
        echo "";
    ?>
    
    

What's wrong with the loop behavior? Fix it so each item appears on a new line.

📋 Daily Micro-Project

Database Focus :

Task :

Write an SQL query to:

  • Identify duplicate employee email addresses.
  • Show how many duplicates exist for each.

Hint : Use GROUP BY and HAVING COUNT(*) > 1.

Trivia: 5 Fun Facts

  1. Python was named after Monty Python, not the snake.
  2. PHP originally stood for "Personal Home Page."
  3. Vue.js was created by a former Google engineer, Evan You.
  4. The first SQL implementation was called SEQUEL.
  5. Python’s GIL (Global Interpreter Lock) limits multithreaded execution.

Tool & Resource of the Day

Tool : PostgREST

Automatically generate a REST API from a PostgreSQL database.

Resource Roundup :

  • Python Collections Guide

Interview Question of the Day

Daily Interview Questions

    Frontend ( Vue.js ) :
    1. What is a Vue component lifecycle?
    2. How does Vue’s reactivity system work?
    3. Difference between v-if and v-show?
    4. What is a Vue directive? Give an example.
    Backend ( Python & PHP ) :
    1. What are Python decorators? Provide an example.
    2. What’s the difference between isset() and empty() in PHP?
    3. How does Python handle memory management?
    4. What is the use of header() function in PHP?
    Database ( SQL ) :
    1. What is a clustered index?
    2. What are the types of normalization?
    3. How do foreign keys enforce referential integrity?
    Others :
    1. What is multithreading? How does Python's GIL affect it?
    2. Define REST. How is it different from SOAP?

Daily Quiz Challenge

    Frontend Quiz ( Vue.js + JS ) :

    1. Which directive binds data to form inputs in Vue?
    2. What is the default root element of a Vue instance?
    3. JavaScript: What does typeof NaN return?

    Backend Quiz ( Python & PHP ) :

    1. In Python, what is the output of bool([])?
    2. What does $_POST contain in PHP?
    3. What is the use of __name__ == "__main__" in Python?

    Others :

    • Databases :What SQL keyword ensures all values in a column are unique?
    • General :What’s the difference between a compiler and an interpreter?

    Mixed Quiz :

    1. Vue.js :What is the use of v-bind?
    2. SQL :What is the purpose of the HAVING clause?
    3. Python :How do you open a file in append mode?

Weekly Cross-Domain Activities ( July 11 to July 17, 2025 )

API of the Day:

Task : Build a stock price tracker using Twelve Data API.

https://twelvedata.com.

Linux/DevOps Tip :

Use htop instead of top for a better interactive process viewer.

Real-World Project of the Week ( July 11 to July 17, 2025 )

Project of the Week:

Build an Expense Tracker using React + Express + MongoDB.

Collaborative Project:

Join the GitHub project “open-budget-app” and contribute a budget visualization module

Case Study:

Analyze how GitHub Actions works and create a basic CI pipeline using YAML.


Previous Daily Coding Challenges & Projects : 04-04-2025   07-04-2025  08-04-2025  09-04-2025  10-04-2025  11-04-2025  14-04-2025  15-04-2025  16-04-2025  17-04-2025  18-04-2025  21-04-2025  22-04-2025  23-04-2025  24-04-2025  25-04-2025  28-04-2025  29-04-2025  30-04-2025  01-05-2025  02-05-2025  05-05-2025  06-05-2025  07-05-2025  08-05-2025  09-05-2025  12-05-2025  13-05-2025  14-05-2025  15-05-2025  16-05-2025  19-05-2025  20-05-2025  21-05-2025  22-05-2025  23-05-2025  26-05-2025  27-05-2025  29-05-2025  30-05-2025  02-06-2025  03-06-2025  04-06-2025  05-06-2025  06-06-2025  09-06-2025  10-06-2025  11-06-2025  12-06-2025  13-06-2025  16-06-2025  17-06-2025  18-06-2025  19-06-2025  20-06-2025  23-06-2025  24-06-2025  25-06-2025  26-06-2025  27-06-2025  30-06-2025  01-07-2025  02-07-2025  03-07-2025  04-07-2025  07-07-2025  08-07-2025  09-07-2025  10-07-2025  11-07-2025  14-07-2025  15-07-2025



Follow us on Facebook and Twitter for latest update.