Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-3-1_DIY1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f1e614bb
authored
Mar 27, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
42f5e958
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
0 deletions
sa.py
sa.py
0 → 100644
View file @
f1e614bb
"""
print("我是输出")
input("我是输入")
#input_food下划线命名
#InputFood驼峰命名
counter = 100 #整数
miles = 100.0 #浮点数
name = "bellcode" #字符串
print(type(counter))
print(type(miles))
print(type(name))
#连续赋值相同的值
a = b = c = 1
print(a,b,c)
a,b,c = 1,2,3
print(a)
print(b)
print(c)
x = 21
y = 8
print("x+y=",x+y)
print("x-y=",x-y)
print("x*y=",x*y)
print("x/y=",x/y)
print("x//y=",x//y)#取整
print("x
%
y=",x
%
y)#取余
print("x**y=",x**y)#幂次方
a = 0
a += 1 #等于a = a +1
width = int(input("三角形底"))
height = int(input("三角形高"))
print(type(width))
print(type(height))
#"打印三角形面积"
print("三角形面积是:",width*height/2)
"""
# x = "2"
# x = "2.4" #向下取整 一步一步操作
# print(type(int(x)))
# x = 2
# z = complex(x)
# print(z)
# x = 21
# print("第一次结果",type(x))
# x = float(x)
# print("第二次结果",type(x))
# x = 21
# y = 8
# z = complex(x,y)
# print(z)
# print(type(z))
str1
=
'hahahah'
str2
=
"hahahah"
str3
=
"""hahahha"""
print
(
str1
,
str2
,
str3
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment