FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
HelloPython/basicKnowledge/HelloWorld.py at master · tanglei168/HelloPython · GitHub
tanglei168
/
HelloPython
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
HelloPython
/
basicKnowledge
/
HelloWorld.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (26 loc) · 735 Bytes
Breadcrumbs
HelloPython
/
basicKnowledge
/
HelloWorld.py
Copy path
File metadata and controls
45 lines (26 loc) · 735 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Hello World
1.字母数字下划线组成,下划线连接
2.去除保留字和关键字
'''
__author__
=
'tzl'
print
(
'Hello python'
)
print
(
'你好,世界'
)
name
=
input
(
'Please enter your name:'
)
# exit(-1)
print
(
'hello'
,
name
)
print
(
name
)
# 浮点数是近似值
print
(
'0.1 + 0.2:'
,
0.1
+
0.2
)
# Ex1
width
=
input
(
'Please input width:'
)
height
=
input
(
'Please input height:'
)
print
(
int
(
width
)
*
int
(
height
))
# 总结:input(提示信息)
# 输出中文的时候要在字符串前面加u。
# 因为python中字符串默认采用ASCII,要声明为unicode就要加u(linux环境下不需要加u)
if
__name__
==
'__main__'
:
#最后执行
print
(
'hello main'
)
Back
|
FazBrowse Home
|
New Git URL