当前位置:网站首页>07 operator
07 operator
2022-04-22 05:57:00 【ʕ·͡ˑ· ཻ ʔ**ʕ·͡ˑ· ཻ ʔ】
Catalog
One 、 The concept of operators
Two 、 Classification of operators
3、 ... and 、 Arithmetic operator
5、 ... and 、 Assignment operator
6、 ... and 、 Logical operators
7、 ... and 、 Operator priority
One 、 The concept of operators
-
Operators are symbols that play a specific role in various operations .
Two 、 Classification of operators
3、 ... and 、 Arithmetic operator
Four 、 Comparison operator
-
The results of the comparison operator are all Boolean values .
-
Numbers 100 And string 100 It's not equal .print(100=='100')#False
5、 ... and 、 Assignment operator
-
The simple equal sign does not mean comparison in a programming language , Used to assign .
-
There is no space between compound assignment operators , come together .
6、 ... and 、 Logical operators
7、 ... and 、 Operator priority
-
Different operators have different priorities by default .()>**>*>/ // % >+ -
-
Parentheses have the highest priority , When priority cannot be determined , Add a small bracket to solve .
8、 ... and 、 Phased comprehensive training
demand :
1. Prompt the user to enter the user name , And save it to a variable
2. Prompt the user for the user's age , Save to variable , And convert it to an integer
3. Prompt the user for the user's height , Save to variable , And convert it to floating point number
4. Output the user name on the console 、 Age 、 Data type of height corresponding variable
5. Output user information in the following format :“ full name :xxx Age :xxx height :xxx”
6. Output the user in the console 5 Years later , Format :“ Zhang San 5 The age after years is 25”
7. Output whether the user is now an adult on the console , Format :“ Is Zhang San an adult :True”.

版权声明
本文为[ʕ·͡ˑ· ཻ ʔ**ʕ·͡ˑ· ཻ ʔ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220538317130.html
边栏推荐
猜你喜欢
随机推荐
Meilisearch usage record
conda命令
03-pycharm
初学C语言用什么编译器(文章末尾有惊喜)
Layer closes the pop-up window and refreshes the parent page
蓝桥杯31天冲刺 Day4
Miniconda source swap (add image)
Musk updates wechat push (Dog Coin)
B/S架构
LeetCode 514. The road of freedom -- dynamic programming
整数拆分问题(动态规划+递归&记录数组)
蓝桥杯31天冲刺 Day23
Opencv uses foreach pixel traversal (both pixel and const int * position parameters are introduced)
golang学习和校招经历
链表的逆序输出 C语言三行代码 递归栈
Idea common shortcut keys
ip数据报中首部 总长度 片偏移的单位
《最优化理论》:运输问题(一)求最小运费【西北角法、最小元素法、伏格尔法】
LeetCode 1591. Strange printer II -- judgment sorting
苹果 cms 自定义对接微信公众号








