Data Types in Python

Data Types in Python

When discussing data types in Python, we must start with the standard data types. The standard data types in Python are as follows: Numeric Types: Numeric data types are used to store numerical values. They are immutable data types, meaning that changing a numeric data type will allocate a new object. In Python 2.X, there … Read more

Common Functions in C/C++: A Comprehensive Guide

Common Functions in C/C++: A Comprehensive Guide

In C/C++ courses and projects, the application of functions is crucial. Here, we have gathered and organized some commonly used functions in C/C++. We hope you can apply them frequently to gain proficiency. 1. Character Processing Functions This category of functions is used for processing individual characters, including character type testing and case conversion. Header … Read more

Beginner’s Guide to C Language: Key Points

Beginner's Guide to C Language: Key Points

In the previous lesson, we dismantled the greatest program in the world, claiming that mastering it means you have grasped 60% of C language. In this lesson, we will discuss some key points related to C language. Review of Last Lesson’s Assignment In the last class, we left an assignment. I wonder if everyone completed … Read more

C Language Programming Basics

··· Exam Countdown: 36 Days ··· ◣Attention Candidates◥ Scan to Join the Preparation Group for Further Studies Courses/Exam Information/Materials/Benefits, one-on-one Q&A in the group! Key Point 1: Characteristics of C Language Structure 1. A C program consists of functions, and there must be exactly one function named main. 2. A C language function consists of … Read more

18 Classic C Programs You Must Memorize

18 Classic C Programs You Must Memorize

1、/*Output the 9*9 multiplication table. There are 9 rows and 9 columns, with i controlling the rows and j controlling the columns.*/ #include “stdio.h” main() {int i,j,result; for (i=1;i<10;i++) { for(j=1;j<10;j++) { result=i*j; printf(“%d*%d=%-3d”,i,j,result);/*-3d means left-aligned, occupying 3 spaces*/ } printf(“\n”);/*Line break after each row*/ } } 2、/*Classical problem: There is a pair of rabbits, … Read more

Creating Holiday Greeting Cards with Python and Pillow

Creating Holiday Greeting Cards with Python and Pillow

Last week, my mom suddenly asked me, “Son, do you remember tomorrow is your aunt’s birthday?” I slapped my forehead and completely forgot about it! My aunt lives in another city, and we don’t keep in touch often, but every year on her birthday, she sends me red envelopes. I can’t afford to be rude … Read more

Create Cool Graphics with Python

Create Cool Graphics with Python

Sometimes, writing code doesn’t always have to be about complex data analysis or websites.You can also use Python to draw! Isn’t that a bit cool? Today, let’s use Python to draw a few simple and beautiful graphics. Although they look like works of art, they actually only require a few lines of code. We’ll talk … Read more

Detailed Explanation of C++ Storage Classes

Detailed Explanation of C++ Storage Classes

Storage classes are used to define the lifetime and visibility of variables and/or functions in a C++ program. The lifetime refers to the duration during which a variable remains active, and visibility refers to the modules in the program that can access the variable. In C++ programs, there are five types of storage classes that … Read more

In-Depth Guide to C++ Arrays

In-Depth Guide to C++ Arrays

Like other programming languages, in C++, an array is a collection of similar types of elements with contiguous memory locations. In C++, std::array is a container that encapsulates fixed-size arrays. In C++, array indexing starts at 0. We can only store a fixed number of elements in a C++ array. In C/C++ programming languages or … Read more

Detailed Explanation of References in C++

Detailed Explanation of References in C++

So far, we have learned about the two types of variables supported by C++: Ordinary variables are variables that hold values of a certain type. For example, creating an integer variable means that the variable can hold integer values. Pointers are variables that store the address of another variable. You can retrieve the value pointed … Read more