Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-5-2
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
92a4134a
authored
Dec 12, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
fdf9b21d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
danny.py
danny.py
0 → 100644
View file @
92a4134a
#print("Hello World!")
#输入 要吃的食物
#input_food = input("今晚我要吃:")
#输出 要吃的食物
#print("今晚我要吃-",input_food)
#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)
print(b)
print(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)
"""
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