[Zero-Basic python] Four arithmetic operations in python and four arithmetic operations in pythonWhen it comes to computers, of course more people now call her computers. Both of them refer to computers. Whatever it is, as long as she is mentioned,
Remember: what kind of math education do we need?Note: This article has a lot of personal views, with a very strong subjective color. Some of these ideas are not necessarily correct, and there are some words that I am not qualified to say. I just
Remember when I was in grade five, my math teacher asked every classmate in the class why he studied maths. I can't remember what my answer is, it's probably a superficial statement like bookkeeping and measurement. In fact, vaguely hidden in the
Here is an instance that uses an Integer object:Test.java File Code:public class test{public static void Main (String args[]) {Integer x = 5;x = x + 10;SYSTEM.OUT.PRINTLN (x);}}The results of the above example compilation run as follows:15When x is
I. OverviewThe Shell, like other programming languages, supports a variety of operators, including:
Arithmetic operators
Relational operators
Boolean operator
String operators
File Test Operators
Second, arithmetic
Java Number & Math classGenerally, when you need to use numbers, we usually use built-in data types, such as:byte, int, long, double , and so on.Instanceint float byte c = 0x4a;However, in the actual development process, we often encounter
Here is an instance that uses an Integer object:Test.java File Code:public class test{ public static void Main (String args[]) {Integer x = 5;x = x + 10;SYSTEM.OUT.PRINTLN (x);}}The results of the above example compilation run as follows:15When x is
we are already inPython
The most basic mathematical functions of python are seen in the operation. In addition,
Math Package
added a lot ofFunction
. Of course, if you want more advanced math features, consider choosing a standard library
NumPy
and
This kind of wrapper, specifically supported by the compiler, is called boxing, so when the built-in data type is used as an object, the compiler will box the built-in type into a wrapper class. Similarly, the compiler can also disassemble an object
This kind of wrapper, specifically supported by the compiler, is called boxing, so when the built-in data type is used as an object, the compiler will box the built-in type into a wrapper class. Similarly, the compiler can also disassemble an object
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.