Introduction to Python: Functions

Introduction to Python: Functions

Functions are organized, reusable code blocks that implement a single or related functionality. Functions enhance the modularity of applications and the reusability of code. Python provides many built-in functions, such as print(). However, you can also create your own functions, known as user-defined functions. Table of Contents 1. What is a Function 2. Defining and … Read more

Defining Functions in Python

Defining Functions in Python

1. Default Value Parameters Specifying default values for parameters is a very useful approach. When calling a function, you can use fewer parameters than defined. # Default values: retries, reminder def ask_ok(prompt, retries=4, reminder='Please try again!'): while True: reply = input(prompt) if reply in ('y', 'ye', 'yes'): # The keyword 'in' is used to confirm … Read more

Introduction to Python Programming: Basics and Syntax

Introduction to Python Programming: Basics and Syntax

HXE Club is not only present in the gaming sector but has also made significant breakthroughs in the programming field! Python is a widely used high-level programming language known for its concise and readable syntax, making it suitable for both beginners and professional developers. Below is an introduction to the basic syntax: Basic Syntax: Variables: … Read more

Summary of Common MATLAB Functions and Commands

Summary of Common MATLAB Functions and Commands

Table of Contents 1. General Commands 2. Operators 3. Programming Language Constructs 4. Basic Matrix Functions and Operations 5. Basic Mathematical Functions 6. Coordinate Transformations, Vector Operations, and Other Special Functions 7. Matrix Functions and Numerical Linear Algebra 8. Data Analysis 9. Polynomials, Nonlinear Equations, and Ordinary Differential Equations 10. Plotting Functions 11. File Operations … Read more

Review: Three Key Concepts in C Language

Review: Three Key Concepts in C Language

The C language is essential knowledge in embedded learning, and most operations revolve around C language. Among them, there are three “hard nuts to crack” that are almost universally recognized. 1. Pointers Pointers are recognized as the most difficult concept to understand, and they are a direct reason many beginners choose to give up. The … Read more

Advanced Self-Learning Notes on Python: The Fourth Knowledge Point – Dictionaries

Advanced Self-Learning Notes on Python: The Fourth Knowledge Point - Dictionaries

Dictionaries 1. Core Features Format: Composed of key-value pairs, separated by commas, and enclosed in { }. Order: In Python 3.7+, dictionaries maintain insertion order; unordered in 3.6 and earlier. Mutability: Supports adding, deleting, and modifying key-value pairs (the dictionary itself is mutable). 2. Element Rules: Key: Must be an immutable type (e.g., int, str, … Read more

Hands-On Series | Episode 2: Say Goodbye to Manual Calculations and Let Python Be Your Super Calculator

Hands-On Series | Episode 2: Say Goodbye to Manual Calculations and Let Python Be Your Super Calculator

Hello everyone, welcome back to the “Hands-On” series! In the last episode, we successfully used Python to calculate <span>123 + 456</span>. You might think, “Is that it? My calculator is much faster than yours.” Hold on, that was just a warm-up. Today, we are going to tackle something more “advanced”—a problem that even calculators find … Read more

C++ Programming for Kids (19) Algorithm Complexity

C++ Programming for Kids (19) Algorithm Complexity

Prelude Mathematical Foundations 1. Functions A function is a type of mapping relationship (correspondence/rule). Since it is a mapping relationship, there must be at least two numbers, one of which participates in the mapping, while the other number establishes a relationship with the mapping result. Typically, we use x and y to represent the two … Read more

Quick Start with Python: A Must-Read for Self-Learners from Zero to Proficiency!

Quick Start with Python: A Must-Read for Self-Learners from Zero to Proficiency!

1. What is Python? Python is a high-level programming language developed by Dutch programmer Guido van Rossum in the late 1980s. Its greatest feature is its concise code and intuitive syntax, making programming feel more like writing in natural language, allowing even complete beginners to understand easily. Imagine you want the computer to output “Hello, … Read more

Notes on Basic Python Knowledge

Notes on Basic Python Knowledge

Notes on basic Python learning. 1. Installation of Python Download link for Python: https://www.python.org/downloads/ Simply download and install the package for your corresponding platform. 2. Using Python or Python3 1. Set up the environment configuration file: <span>sudo vi /etc/profile</span>, this is for global variables affecting all users. Generally, you only need to modify: vi ~/.bash_profile … Read more