当前位置:网站首页>Python learning Day1 -- Basic Learning
Python learning Day1 -- Basic Learning
2020-11-08 08:04:00 【osc_1mofhvr6】
1.python
python It's an interpretive language , It's also a weakly typed programming language .
2. Variable
A variable is a name used to store data , Can be called multiple times during program execution .
2.1 Naming rules for variables
1. There are letters 、 Numbers 、 Underline composition
2. Cannot start with a number , It can't be pure numbers
3. It can't be a keyword
4. Case sensitive
Be careful
1. Variable names should not be too long
2. The variable name has to make sense
3. The variable name should not be in Chinese
4. It can be named hump and underline
Hump naming :ageSexFamel, Except for the first letter words, the first letters of other words are capitalized
Underline naming :age_sex_famel
3. data type
int ( Integer types ), You can do operations ,+, -, * ,/ ,%( Remainder ) ,//( integer )
str ( String type ), It can be spliced and repeated ,+ ( String splicing )*( Duplicate string ), Use single quotes , Double quotes , All three quotes are strings
bool( Boolean value ), Only True and False Two values
4. Conditional statements if else
- have only if Conditional statements
if Conditions :
Code block
The execution process is : When conditions hold , Execute code block
2.if && else
if Conditions :
Code block 1
else:
Code block 2
Execute the process , When conditions hold , Execute code block 1, Otherwise, execute the code block 2, Two inside execution 1 individual .
3.if && elif && else
if Conditions 1:
Code block 1
elif Conditions 2:
Code block 2
…
else:
Code block n
Execute the process : If the conditions are met 1, Just execute the code block 1, If the conditions are met 2, Just execute the code block 2, If all the conditions are not met , execute else The following code block , From the top down , Execute sequentially , If there are conditions , The program to stop .
版权声明
本文为[osc_1mofhvr6]所创,转载请带上原文链接,感谢
边栏推荐
- Six key points of data science interview
- ts流中的pcr与pts计算与逆运算
- China Telecom announces 5g SA commercial scale in 2020
- More than 50 object detection datasets from different industries
- FORTRAN 77 reads some data from the file and uses the heron iteration formula to solve the problem
- Sum up some useful functions
- GoLand writes a program with template
- Unparseable date: 'mon Aug 15 11:24:39 CST 2016', time format conversion exception
- Wechat nickname Emoji expression, special expression causes the list not to be displayed, export excel error report and other problems solved!
- What details does C + + improve on the basis of C
猜你喜欢
【原创】关于高版本poi autoSizeColumn方法异常的情况
The road of cloud computing: a free AWS cloud server
Get tree menu list
C language I blog assignment 03
VC6 compatibility and open file crash resolution
Cloud Alibabab笔记问世,全网详解仅此一份手慢无
0.计算机简史
About the promotion of the whole stack of engineers, from the introduction to give up the secret arts, do not click in to have a look?
Insight -- the application of sanet in arbitrary style transfer
Wechat nickname Emoji expression, special expression causes the list not to be displayed, export excel error report and other problems solved!
随机推荐
NOIP 2012 提高组 复赛 第一天 第二题 国王游戏 game 数学推导 AC代码(高精度 低精度 乘 除 比较)+60代码(long long)+20分代码(全排列+深搜dfs)
Codeforce算法题 | 你能想出解法,让你的基友少氪金吗?
nvm
Qt混合Python开发技术:Python介绍、混合过程和Demo
ulab 1.0.0发布
C++基础知识篇:C++ 基本语法
scala 中 Future 的简单使用
Seven features of Python 3.9
[solution] distributed timing task solution
swiper 窗口宽度变化,页面宽度高度变化 导致自动滑动 解决方案
LadonGo开源全平台渗透扫描器框架
c# 表达式树(一)
个人短网址生成平台 自定义域名、开启防红、统计访问量
leetcode之判断路径是否相交
Abnormal + Abstract
5g + Ar out of the circle, China Mobile Migu becomes the whole process strategic partner of the 33rd China Film Golden Rooster Award
Mouse small hand
These core technology of object-oriented, after you master it, you can have a good interview
shiyou的数值分析作业
GET,POST,PUT,DELETE,OPTIONS用法与说明