w3resource

Daily Coding Challenges & Projects


Wednesday


Frontend Mini Project Challenge

Theme : Vue.js Components

Task :

Build a Vue.js component that accepts a prop called color and displays a colored box. The box should update its color dynamically when the prop changes.

Bonus : Add a computed property to display the current color name below the box.

Backend Challenge

Python & PHP

Python Task :

Write a Python script to compress a large text file using gzip, ensuring memory efficiency for very large files.


PHP Task :

Create a PHP script that validates an email address and stores valid emails into a MySQL database.

Database Query Challenge

Problems on SQL - HR Database :

  1. Write a SQL query to list all employees who have not received any salary increment in the last 2 years.
  2. Write a SQL query to find managers who manage more than one department.

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem : Write a function to check if a string is a palindrome.
    • Hint : Ignore spaces and casing.
  • Medium:
    • Problem : Given an array of integers, find the subarray with the maximum sum using Kadane's algorithm.
    • Hint : You only need to consider contiguous subarrays.
  • Hard:
    • Problem : Implement a function to detect a cycle in a linked list.
    • Hint : Use Floyd’s Tortoise and Hare algorithm (two-pointer approach).

Bug of the Day

Language Focus : Python & PHP

Python Bug

    Buggy Code:

    
    def add_numbers(a, b):
        return a + b
    result = add_numbers("5", 10)
    print(result)
    

Challenge :

Find and fix the error.


PHP Bug

    Buggy Code:

    
    <?php
    $number = "10";
    if($number === 10){
        echo "Equal";
    } else {
        echo "Not Equal";
    }
    ?>
    

Challenge :

Find and fix the error.

📋 Daily Micro-Project

Database Focus :

Task :

Optimize a slow SQL query that fetches all employees from departments with more than 10 employees by creating appropriate indexes.

Trivia: 5 Fun Facts

  1. Python was named after the British comedy group "Monty Python," not the snake.
  2. The first computer virus was created in 1986 and called "Brain."
  3. Vue.js was created by Evan You, a former Google engineer.
  4. The first version of PHP stood for "Personal Home Page."
  5. Git, the popular version control system, was created by Linus Torvalds.

Tool & Resource of the Day

Tool : Postman

Why : A powerful tool for testing REST APIs interactively.

Resource Roundup :

    Vue.js Essentials :

  • Vue.js Official Guide: https://vuejs.org/guide/introduction.html

Interview Question of the Day

Daily Interview Questions

    Frontend :
    1. How does data binding work in Vue.js?
    2. What is the difference between props and state in Vue?
    3. How do you handle conditional rendering in Vue templates?
    4. What is the virtual DOM, and how does Vue use it?
    Backend :
    1. What are Python decorators, and how are they used?
    2. Explain the difference between Python lists and tuples.
    3. How does PHP handle sessions?
    4. What are PHP superglobals? Provide examples.
    Database ( SQL ) :
    1. What is normalization in databases? Why is it important?
    2. How do foreign keys enforce referential integrity?
    3. Explain the purpose of database indexing.
    Others :
    1. What is the difference between synchronous and asynchronous execution?
    2. Explain what happens during a context switch in an operating system.

Daily Quiz Challenge

    Frontend Quiz ( Vue Focus ) :

    1. What directive is used for conditional rendering in Vue?
      • v-if
      • v-bind
      • v-for
      • v-model
    2. In Vue.js, props are:
      • Read-only
      • Writable by the child
      • Optional
      • Used only for events
    3. Which lifecycle hook is called after the component is mounted?
      • beforeCreate
      • created
      • mounted
      • beforeMount

    Backend Quiz ( Python/PHP ) :

    1. In Python, def func(a, b=2) means:
      • a is optional
      • b has a default value of 2
      • Both are required
      • func returns 2
    2. In PHP, what symbol is used to denote a variable?
      • $
      • @
      • &
      • #
    3. What does the len() function return in Python?
      • Type of object
      • Length of object
      • Sum of elements
      • Last element

    Database :

    1. Which SQL clause restricts rows returned by a query?
      • ORDER BY
      • WHERE
      • GROUP BY
      • HAVING

    Other :

    1. What does OS stand for?
      • Open Source
      • Operating System
      • Online Server
      • Output Stream

Weekly Cross-Domain Activities ( June 27 to July 03, 2025 )

API of the Day:

Task : Build a real-time currency converter using the ExchangeRate API

https://www.exchangerate-api.com/

Linux/DevOps Tip :

Title : Top 5 Log Monitoring Commands: tail, grep, less, journalctl, watch

Real-World Project of the Week ( June 27 to July 03, 2025 )

Project of the Week:

Build a Book Management System with Vue.js + Node.js + PostgreSQL

Collaborative Project:

Contribute to an open-source to-do app with multi-user auth on GitHub.

Case Study:

Explore how Notion uses dynamic blocks and replicate a basic block editor.


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



Follow us on Facebook and Twitter for latest update.