# ncert_learn

**ncert_learn** is a comprehensive Python module designed to support NCERT Class 12 Computer Science students. It offers a wide range of utility functions across various topics, including Python programming, MySQL database interactions, mathematical operations, data structures, system utilities, and more.

## Key Features

### **Mathematical Functions**
- Prime number check
- Armstrong, Strong, Niven, Palindrome checks
- Fibonacci numbers, even/odd checks, and more
- Advanced functions like GCD, LCM, prime factorization, modular exponentiation, and fast Fourier transform
- **New Advanced Mathematical Functions**: 
  - `adv_gcd`, `adv_lcm`, `adv_prime_factors`, `adv_is_prime`

### **Data Structures**
- Stack operations using lists and dictionaries (push, pop, peek, display)

### **Geometric Calculations**
- Area calculations for circles, rectangles, squares, polygons, and triangles

### **Number Conversions**
- Convert integers to binary, octal, hexadecimal, and vice versa

### **MySQL Operations**
- Connect to MySQL, manage databases and tables, execute queries
- Advanced MySQL execution for optimized database management

### **Sorting Algorithms**
- Implementations of Bubble Sort and Insertion Sort

### **File Handling**
- Read, write, and manage text, CSV, and binary files
- File operations like copying, reading specific lines, and clearing contents
- Advanced file operations (e.g., creating directories, renaming, moving files, extracting zip files)

### **System Utilities**
- Fetch information about the operating system, processor, network connectivity, and Python interpreter

### **Package Management**
- Install and manage Python libraries, including bulk installation from a list

### **Time Management**
- Access current time, process time, monotonic time, and thread time

### **XAMPP Utilities**
- Start/stop XAMPP MySQL and Apache, check PHPMyAdmin access

### **Zip File Handling**
- Handle ZIP files (list contents, extract, add files)

### **Nmap Scans**
- Perform various Nmap scans such as intense scan, quick scan, OS detection, and more

### **SQLMap Scans**
- Perform SQL injection tests using SQLMap

### **Text, Binary, CSV File Operations**
- Overwrite and manipulate text, binary, and CSV files with advanced handling

### **Advanced Mathematical and Cryptographic Functions**
- Functions for GCD, LCM, prime factors, modular exponentiation, Fibonacci, and more
- Advanced hashing, modular inverse, and fast Fourier transforms

### **List Operations**
- Advanced list handling functions such as sorting, reversing, finding, combining, and counting items

### **String Operations**
- String manipulation, counting occurrences, and text transformations like case conversion, concatenation, and joining

### **Dictionary Operations**
- Manage key-value pairs in dictionaries with advanced functions for adding, removing, updating, and fetching values

### **Advanced Operations**
- Functions for advanced number theory (e.g., GCD, LCM, Fibonacci)
- Optimized algorithms for cryptographic and mathematical operations

## New Features in Version 4.6.0
- **New Functionality**: A suite of new functions for enhanced mathematical, plotting, and numerical operations.
  - **Numerical Functions**: 
    - `numerical_add`, `numerical_subtract`, `numerical_multiply`, `numerical_divide`, `numerical_zeros`, `numerical_ones`, `numerical_reshape`, `numerical_dot`, `numerical_inv`, `numerical_det`, `numerical_randint`, `numerical_randn`, `numerical_mean`, `numerical_median`, `numerical_variance`, `numerical_std`, `numerical_string_length`, `numerical_string_upper`, `numerical_string_lower`, `numerical_svd`
  - **Plotting Functions**: 
    - `plot_histogram`, `plot_line`, `plot_scatter`, `plot_bar`, `plot_pie`, `plot_box`, `plot_heatmap`, `plot_stacked_bar`, `plot_area`, `plot_violin`, `plot_pair`, `plot_3d`, `plot_subplots`, `plot_hexbin`, `plot_contour`
  
- **Advanced File Handling**: Added operations for advanced file management (e.g., renaming, moving, compressing files, and extracting ZIP)
- **Enhanced MySQL Operations**: Introduced `mysql_execute_advanced_mode` for optimized database queries
- **Advanced System Utilities**: More functions to handle system tasks and fetch system information efficiently
- **Bug Fixes and Optimizations**: General improvements to enhance performance and stability

## Recommendation: Upgrade to Version 4.6.0

We recommend downloading **version 4.6.0** as it includes important bug fixes and improvements that enhance performance and stability. Make sure to update to this version for a better experience.

## Disclaimer
This module is intended for educational purposes only. Using this module for any illegal activities is strictly prohibited. The authors and contributors are not responsible for any misuse of the module.

## Installation

To install **ncert_learn**, use `pip`:

```bash
pip install ncert_learn
