/** * Twenty Twenty-Four functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Twenty Twenty-Four * @since Twenty Twenty-Four 1.0 */ /** * Register block styles. */ if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) : /** * Registers custom block styles. * * @since Twenty Twenty-Four 1.0 * @return void */ function twentytwentyfour_block_styles() { register_block_style( 'core/details', array( 'name' => 'arrow-icon-details', 'label' => __( 'Arrow icon', 'twentytwentyfour' ), /* * Styles for the custom Arrow icon style of the Details block */ 'inline_style' => ' .is-style-arrow-icon-details { padding-top: var(--wp--preset--spacing--10); padding-bottom: var(--wp--preset--spacing--10); } .is-style-arrow-icon-details summary { list-style-type: "\2193\00a0\00a0\00a0"; } .is-style-arrow-icon-details[open]>summary { list-style-type: "\2192\00a0\00a0\00a0"; }', ) ); register_block_style( 'core/post-terms', array( 'name' => 'pill', 'label' => __( 'Pill', 'twentytwentyfour' ), /* * Styles variation for post terms * https://github.com/WordPress/gutenberg/issues/24956 */ 'inline_style' => ' .is-style-pill a, .is-style-pill span:not([class], [data-rich-text-placeholder]) { display: inline-block; background-color: var(--wp--preset--color--base-2); padding: 0.375rem 0.875rem; border-radius: var(--wp--preset--spacing--20); } .is-style-pill a:hover { background-color: var(--wp--preset--color--contrast-3); }', ) ); register_block_style( 'core/list', array( 'name' => 'checkmark-list', 'label' => __( 'Checkmark', 'twentytwentyfour' ), /* * Styles for the custom checkmark list block style * https://github.com/WordPress/gutenberg/issues/51480 */ 'inline_style' => ' ul.is-style-checkmark-list { list-style-type: "\2713"; } ul.is-style-checkmark-list li { padding-inline-start: 1ch; }', ) ); register_block_style( 'core/navigation-link', array( 'name' => 'arrow-link', 'label' => __( 'With arrow', 'twentytwentyfour' ), /* * Styles for the custom arrow nav link block style */ 'inline_style' => ' .is-style-arrow-link .wp-block-navigation-item__label:after { content: "\2197"; padding-inline-start: 0.25rem; vertical-align: middle; text-decoration: none; display: inline-block; }', ) ); register_block_style( 'core/heading', array( 'name' => 'asterisk', 'label' => __( 'With asterisk', 'twentytwentyfour' ), 'inline_style' => " .is-style-asterisk:before { content: ''; width: 1.5rem; height: 3rem; background: var(--wp--preset--color--contrast-2, currentColor); clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z'); display: block; } /* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */ .is-style-asterisk:empty:before { content: none; } .is-style-asterisk:-moz-only-whitespace:before { content: none; } .is-style-asterisk.has-text-align-center:before { margin: 0 auto; } .is-style-asterisk.has-text-align-right:before { margin-left: auto; } .rtl .is-style-asterisk.has-text-align-left:before { margin-right: auto; }", ) ); } endif; add_action( 'init', 'twentytwentyfour_block_styles' ); /** * Enqueue block stylesheets. */ if ( ! function_exists( 'twentytwentyfour_block_stylesheets' ) ) : /** * Enqueues custom block stylesheets. * * @since Twenty Twenty-Four 1.0 * @return void */ function twentytwentyfour_block_stylesheets() { /** * The wp_enqueue_block_style() function allows us to enqueue a stylesheet * for a specific block. These will only get loaded when the block is rendered * (both in the editor and on the front end), improving performance * and reducing the amount of data requested by visitors. * * See https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ for more info. */ wp_enqueue_block_style( 'core/button', array( 'handle' => 'twentytwentyfour-button-style-outline', 'src' => get_parent_theme_file_uri( 'assets/css/button-outline.css' ), 'ver' => wp_get_theme( get_template() )->get( 'Version' ), 'path' => get_parent_theme_file_path( 'assets/css/button-outline.css' ), ) ); } endif; add_action( 'init', 'twentytwentyfour_block_stylesheets' ); /** * Register pattern categories. */ if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) : /** * Registers pattern categories. * * @since Twenty Twenty-Four 1.0 * @return void */ function twentytwentyfour_pattern_categories() { register_block_pattern_category( 'twentytwentyfour_page', array( 'label' => _x( 'Pages', 'Block pattern category', 'twentytwentyfour' ), 'description' => __( 'A collection of full page layouts.', 'twentytwentyfour' ), ) ); } endif; add_action( 'init', 'twentytwentyfour_pattern_categories' ); Basic Question – SANDIP KUMAR SINGH https://sksiddha.com Assistant Professor Computer Science @RRIMT Lucknow Sun, 27 Jul 2025 14:44:23 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://sksiddha.com/wp-content/uploads/2024/08/sksiddha-logo-100x100.png Basic Question – SANDIP KUMAR SINGH https://sksiddha.com 32 32 Beyond the Hype: How Data Science Turns Raw Information into Real-World Gold https://sksiddha.com/beyond-the-hype-how-data-science-turns-raw-information-into-real-world-gold/ https://sksiddha.com/beyond-the-hype-how-data-science-turns-raw-information-into-real-world-gold/#respond Sun, 27 Jul 2025 14:43:55 +0000 https://sksiddha.com/?p=1536 We hear the term “data science” everywhere – hailed as the “sexiest job of the 21st century,” the engine behind AI breakthroughs, and the magic wand businesses wave to find hidden profits. But what is it, really? And more importantly, why should you care, whether you’re a business leader, a budding techie, or just someone curious about […]

<p>The post Beyond the Hype: How Data Science Turns Raw Information into Real-World Gold first appeared on SANDIP KUMAR SINGH.</p>

]]>
We hear the term “data science” everywhere – hailed as the “sexiest job of the 21st century,” the engine behind AI breakthroughs, and the magic wand businesses wave to find hidden profits. But what is it, really? And more importantly, why should you care, whether you’re a business leader, a budding techie, or just someone curious about the modern world?

Data Science: More Than Just Number Crunching

At its core, data science is the multidisciplinary field focused on extracting knowledge and actionable insights from data. It’s the intersection of:

  1. Domain Expertise: Understanding the specific context – business, healthcare, finance, etc. – you’re working in.
  2. Programming & Tools: Using languages like Python and R, along with databases (SQL) and big data technologies (Spark, Hadoop).
  3. Math & Statistics: Applying statistical methods, linear algebra, and calculus to model patterns and relationships.
  4. Machine Learning: Leveraging algorithms that learn from data to make predictions or decisions without explicit programming.
  5. Communication & Visualization: Telling the story hidden in the data clearly and compellingly to stakeholders.

Think of it as detective work on a massive scale. A data scientist gathers clues (data), analyzes them using sophisticated tools (statistics, ML), uncovers hidden patterns (insights), and presents a compelling case (visualization, recommendations) to solve a problem or seize an opportunity.

Why Does Data Science Matter? It’s Everywhere!

You interact with data science daily, often without realizing it:

  • Your Netflix Recommendations: Sophisticated algorithms analyze your viewing history and compare it to millions of others to predict what you’ll love next.
  • Fraud Detection: Your bank uses real-time models to spot unusual transactions and protect your account.
  • Personalized Medicine: Doctors can use patient data to predict disease risk or tailor treatments more effectively.
  • Supply Chain Optimization: Companies predict demand, optimize delivery routes, and manage inventory efficiently using data.
  • Smart Cities: Traffic flow, energy consumption, and public safety are improved through data analysis.
  • Search Engines: Google’s algorithms constantly learn from user interactions to deliver better results.

The Data Science Workflow: From Question to Impact

It’s rarely a linear path, but a typical data science project involves these key phases (often visualized as the CRISP-DM model):

  1. Business Understanding: What problem are we trying to solve? What questions need answering? Define success metrics.
  2. Data Acquisition & Collection: Gathering relevant data from databases, APIs, sensors, surveys, logs, etc.
  3. Data Cleaning & Preprocessing (The Unsung Hero!): This is often 80% of the work! Fixing missing values, errors, inconsistencies, and transforming data into a usable format.
  4. Exploratory Data Analysis (EDA): Getting to know the data – visualizing distributions, finding patterns, correlations, and anomalies. Asking “what if?” questions.
  5. Modeling: Selecting and applying appropriate machine learning algorithms (regression, classification, clustering, etc.) to learn from the data.
  6. Evaluation: Rigorously testing the model’s performance on unseen data. Is it accurate, reliable, and fair? Does it solve the original problem?
  7. Deployment & Monitoring: Integrating the model into real-world systems (apps, websites, processes) and continuously monitoring its performance to ensure it stays effective.
  8. Communication: Presenting findings, insights, and recommendations clearly to non-technical stakeholders to drive action.

The Toolkit: What Powers Data Science?

Data scientists wield a powerful arsenal:

  • Programming: Python (with Pandas, NumPy, Scikit-learn, TensorFlow, PyTorch), R.
  • Databases: SQL (MySQL, PostgreSQL), NoSQL (MongoDB).
  • Big Data: Apache Spark, Hadoop.
  • Visualization: Tableau, Power BI, Matplotlib, Seaborn, ggplot2.
  • Cloud Platforms: AWS, Azure, Google Cloud Platform (for scalable computing and storage).

The Future & The Responsibility

Data science is rapidly evolving. We’re seeing advancements in deep learning, natural language processing, computer vision, and automated machine learning (AutoML). However, with great power comes great responsibility:

  • Ethics & Bias: Models trained on biased data can perpetuate discrimination. Ensuring fairness and accountability is paramount.
  • Privacy: Protecting sensitive user information is non-negotiable.
  • Explainability (XAI): Understanding why complex models (like deep learning) make decisions is crucial for trust and debugging.

Ready to Dive In?

Data science isn’t just for PhDs anymore. The barrier to entry is lowering with abundant online resources, courses, and powerful open-source tools. Whether you want to:

  • Solve complex business problems
  • Build intelligent applications
  • Contribute to scientific discovery
  • Simply understand the data-driven world around you

…data science offers a fascinating and impactful path. It’s the art and science of turning the overwhelming flood of data into a stream of valuable insights, driving innovation and smarter decisions across every sector. The data is out there – the question is, what story will you uncover?

What data science application fascinates you the most? Share your thoughts in the comments!

<p>The post Beyond the Hype: How Data Science Turns Raw Information into Real-World Gold first appeared on SANDIP KUMAR SINGH.</p>

]]>
https://sksiddha.com/beyond-the-hype-how-data-science-turns-raw-information-into-real-world-gold/feed/ 0
Program of reverse of a number in c,java,python https://sksiddha.com/reverse-of-a-number-in-c/ https://sksiddha.com/reverse-of-a-number-in-c/#comments Sat, 01 Jul 2023 14:29:11 +0000 https://sksiddha.com/?p=370 Algorithm algorithm to reverse a number can be described using the following steps: C the reverseNumber() function takes an integer as input and reverses it. It uses a while loop to extract the digits of the number one by one and builds the reversed number by multiplying the current reversed number by 10 and adding […]

<p>The post Program of reverse of a number in c,java,python first appeared on SANDIP KUMAR SINGH.</p>

]]>

Table of Contents

Algorithm

algorithm to reverse a number can be described using the following steps:

  1. Initialize a variable to store the reversed number, let’s call it reversedNumber, and set it to 0.
  2. Extract the rightmost digit of the given number by using the modulo operator % with 10. Let’s call this digit remainder.
  3. Multiply the current reversedNumber by 10 and add the remainder to it. This step appends the remainder digit to the reversed number.
  4. Divide the given number by 10, discarding the rightmost digit. This step removes the rightmost digit from the given number.
  5. Repeat steps 2 to 4 until the given number becomes 0.
  6. The final value of reversedNumber will be the reversed form of the original number.

C

#include <stdio.h>

int reverseNumber(int number) {
    int reversedNumber = 0;

    while (number != 0) {
        int remainder = number % 10;
        reversedNumber = reversedNumber * 10 + remainder;
        number /= 10;
    }

    return reversedNumber;
}

int main() {
    int number;

    printf("Enter a number: ");
    scanf("%d", &number);

    int reversedNumber = reverseNumber(number);

    printf("Reversed number: %d\n", reversedNumber);

    return 0;
}

the reverseNumber() function takes an integer as input and reverses it. It uses a while loop to extract the digits of the number one by one and builds the reversed number by multiplying the current reversed number by 10 and adding the extracted digit. Finally, the reversed number is returned.

In the main() function, the user is prompted to enter a number. The scanf() function is used to read the input and store it in the number variable. Then, the reverseNumber() function is called, passing the number as an argument. The reversed number is stored in the reversedNumber variable and printed using printf().

C++

#include <iostream>

int reverseNumber(int number) {
    int reversedNumber = 0;

    while (number != 0) {
        int remainder = number % 10;
        reversedNumber = reversedNumber * 10 + remainder;
        number /= 10;
    }

    return reversedNumber;
}

int main() {
    int number;

    std::cout << "Enter a number: ";
    std::cin >> number;

    int reversedNumber = reverseNumber(number);

    std::cout << "Reversed number: " << reversedNumber << std::endl;

    return 0;
}

we use similar logic as the C program to reverse the number. The reverseNumber() function takes an integer as input, reverses it, and returns the reversed number.

In the main() function, the user is prompted to enter a number using std::cout. The input is then read using std::cin and stored in the number variable. The reverseNumber() function is called, passing the number as an argument. The reversed number is stored in the reversedNumber variable.

Finally, the reversed number is printed to the console using std::cout along with std::endl.

java

import java.util.Scanner;

public class ReverseNumber {
    public static int reverseNumber(int number) {
        int reversedNumber = 0;

        while (number != 0) {
            int remainder = number % 10;
            reversedNumber = reversedNumber * 10 + remainder;
            number /= 10;
        }

        return reversedNumber;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter a number: ");
        int number = scanner.nextInt();

        int reversedNumber = reverseNumber(number);

        System.out.println("Reversed number: " + reversedNumber);
    }
}

we define a class called ReverseNumber. It has a reverseNumber() method that takes an integer as input, reverses it, and returns the reversed number.

In the main() method, we create a Scanner object to read user input. The user is prompted to enter a number using System.out.print(), and the input is read using scanner.nextInt() and stored in the number variable.

Then, we call the reverseNumber() method, passing the number as an argument. The reversed number is stored in the reversedNumber variable.

Finally, we print the reversed number to the console using System.out.println().

Python

def reverse_number(number):
    reversed_number = 0

    while number != 0:
        remainder = number % 10
        reversed_number = reversed_number * 10 + remainder
        number //= 10

    return reversed_number

number = int(input("Enter a number: "))
reversed_number = reverse_number(number)

print("Reversed number:", reversed_number)

we define a function called reverse_number() that takes an integer as input, reverses it, and returns the reversed number.

We use a while loop to extract the digits of the number one by one. Inside the loop, we calculate the remainder by using the modulo operator % with 10. We then update the reversed_number variable by multiplying it by 10 and adding the remainder. Finally, we update the number by using integer division // with 10 to remove the last digit.

In the main part of the code, we prompt the user to enter a number using the input() function and convert it to an integer using int(). We then call the reverse_number() function, passing the number as an argument. The reversed number is stored in the reversed_number variable.

<p>The post Program of reverse of a number in c,java,python first appeared on SANDIP KUMAR SINGH.</p>

]]>
https://sksiddha.com/reverse-of-a-number-in-c/feed/ 1
Write a Program to find the factorial of a given number in C , java , python https://sksiddha.com/write-a-program-to-find-the-factorial-of-a-given-number-in-c/ https://sksiddha.com/write-a-program-to-find-the-factorial-of-a-given-number-in-c/#comments Fri, 30 Jun 2023 17:21:50 +0000 https://sksiddha.com/?p=356 Algorithm C program In this program, the factorial() function is defined recursively. It checks if the number n is either 0 or 1 (base case), in which case it returns 1. Otherwise, it calls itself with n-1 and multiplies the current number n with the factorial of the smaller value. The function continues this process […]

<p>The post Write a Program to find the factorial of a given number in C , java , python first appeared on SANDIP KUMAR SINGH.</p>

]]>

Table of Contents

Algorithm

  1. Start with a variable to store the factorial value and set it to 1.
  2. Take the input of the number for which you want to find the factorial.
  3. Check if the number is negative. If it is, display an error message as the factorial is not defined for negative numbers.
  4. If the number is non-negative, proceed with the following steps:
    • Initialize a loop variable to 1.
    • Enter a loop that iterates from 1 to the given number.
    • Multiply the current factorial value by the loop variable.
    • Update the factorial value with the result of multiplication.
    • Increment the loop variable by 1.
    • Repeat the above four steps until the loop variable reaches the given number.
  5. After the loop completes, the factorial value will hold the factorial of the given number.
  6. Display the factorial value as the output.
factorial = 1
input number
if number < 0:
    display "Factorial is not defined for negative numbers."
else:
    loop_var = 1
    while loop_var <= number:
        factorial = factorial * loop_var
        increment loop_var by 1
    display factorial

C program

#include <stdio.h>

int factorial(int n) {
    if (n == 0 || n == 1)
        return 1;
    else
        return n * factorial(n - 1);
}

int main() {
    int num;
    printf("Enter a number: ");
    scanf("%d", &num);

    if (num < 0) {
        printf("Factorial is not defined for negative numbers.\n");
    } else {
        int result = factorial(num);
        printf("Factorial of %d is %d.\n", num, result);
    }

    return 0;
}

In this program, the factorial() function is defined recursively. It checks if the number n is either 0 or 1 (base case), in which case it returns 1. Otherwise, it calls itself with n-1 and multiplies the current number n with the factorial of the smaller value. The function continues this process until it reaches the base case and returns the final factorial value.

C++

#include <iostream>

unsigned long long factorial(int n) {
    if (n == 0 || n == 1)
        return 1;
    else
        return n * factorial(n - 1);
}

int main() {
    int num;
    std::cout << "Enter a number: ";
    std::cin >> num;

    if (num < 0) {
        std::cout << "Factorial is not defined for negative numbers." << std::endl;
    } else {
        unsigned long long result = factorial(num);
        std::cout << "Factorial of " << num << " is " << result << "." << std::endl;
    }

    return 0;
}

In this program, we have a recursive function factorial() that calculates the factorial of a given number. The main() function prompts the user to enter a number using std::cout and std::cin, and then calls the factorial() function to compute the factorial. The result is then displayed on the console using std::cout.

Please note that the factorial() function assumes that the input number is a non-negative integer. Also, an unsigned long long data type is used to handle larger factorial values to avoid overflow.

JAVA

import java.util.Scanner;

public class Factorial {
    public static int factorial(int n) {
        if (n == 0 || n == 1)
            return 1;
        else
            return n * factorial(n - 1);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter a number: ");
        int num = scanner.nextInt();

        if (num < 0) {
            System.out.println("Factorial is not defined for negative numbers.");
        } else {
            int result = factorial(num);
            System.out.println("Factorial of " + num + " is " + result + ".");
        }
    }
}

In this program, we have a recursive method factorial() that calculates the factorial of a given number. The main() method prompts the user to enter a number, reads it from the standard input using the Scanner class, and then calls the factorial() method to compute the factorial. The result is then displayed on the console.

Please note that the factorial() method assumes that the input number is a non-negative integer.

Python

def factorial(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n * factorial(n - 1)

num = int(input("Enter a number: "))

if num < 0:
    print("Factorial is not defined for negative numbers.")
else:
    result = factorial(num)
    print(f"Factorial of {num} is {result}.")

In this program, we define a recursive function factorial() that calculates the factorial of a given number. The input() function is used to prompt the user to enter a number, and the int() function is used to convert the input to an integer. Then, we check if the number is negative. If it is, we display a message indicating that the factorial is not defined for negative numbers. Otherwise, we call the factorial() function to compute the factorial and display the result using f-string formatting.

Please note that the factorial() function assumes that the input number is a non-negative integer.

<p>The post Write a Program to find the factorial of a given number in C , java , python first appeared on SANDIP KUMAR SINGH.</p>

]]>
https://sksiddha.com/write-a-program-to-find-the-factorial-of-a-given-number-in-c/feed/ 17