提交 478facf3 编写于 作者: ToTensor's avatar ToTensor

send topic success

上级 83b5506a
.vscode
.idea
.DS_Store
__pycache__
*.pyc
*.zip
*.out
helper.py
test.md
20211203Python编程无师自通.csv
data_backup
test_dir
test.html
\ No newline at end of file
{
"Python编程无师自通": "c798a5992a654857867ec15660e1c32a",
"全程软件测试(第3版)": "825acb73c85c4c4bb9632afe858bc097",
"深入剖析Nginx": "608fd0c7025a4a34a97a29897b067d24",
"前端体验设计——HTML5+CSS3终极修炼": "c4eeb42b07f54b42a9fd1568b8ec4b98",
"零基础学机器学习": "b88b00f6ad14402ea66695d6809614da"
}
\ No newline at end of file
# http://tinyurl.com/z6facmk
global _start
section .text
_start:
mov rax , 1
mov rdi , 1
mov rsi , message
mov rdx , 13
syscall
; exit(0)
mov eax , 60
xor rdi , rdi
syscall
message:
db "Hello, World!", 10
\ No newline at end of file
# http://tinyurl.com/zhj8ap6
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/hp2plhs
# 该代码有一个错误
my_string = "Hello World.
\ No newline at end of file
# http://tinyurl.com/jxpztcx
# 该代码有一个错误
10 / 0
\ No newline at end of file
# http://tinyurl.com/gtp6amr
# 该代码有一个错误
y = 2
x =1
\ No newline at end of file
# http://tinyurl.com/jerpe6u
# 偶数
12 % 2
\ No newline at end of file
# http://tinyurl.com/hh9fqzy
14 // 3
> 4
\ No newline at end of file
# http://tinyurl.com/zlkjjdp
14 / 3
> 4.666666666666667
\ No newline at end of file
# http://tinyurl.com/hgjyj7o
2 + 2 * 2
\ No newline at end of file
# http://tinyurl.com/jm7cxzp
100 > 10
\ No newline at end of file
# http://tinyurl.com/gsdhr8q
100 < 10
\ No newline at end of file
# http://tinyurl.com/zdqghb2
1 == 1 and 2 == 2
\ No newline at end of file
# http://tinyurl.com/zpvk56u
1 == 1 and 10 != 2 and 2 < 10
\ No newline at end of file
# http://tinyurl.com/hosuh7c
1 == 1 or 1 == 2
\ No newline at end of file
# http://tinyurl.com/ja9mech
1 == 1 or 1 == 2 or 1 == 3
\ No newline at end of file
# http://tinyurl.com/h45eq6v
not 1 == 1
\ No newline at end of file
# 不要执行
If (expression) Then
(code_area1)
Else
(code_area2)
\ No newline at end of file
# http://tinyurl.com/htvy6g3
home = "America"
if home == "America":
print("Hello, America!")
else:
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/jytyg5x
home = "Canada"
if home == "America":
print("Hello, America!")
else:
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/jyg7dd2
home = "America"
if home == "America":
print("Hello, America!")
\ No newline at end of file
# http://tinyurl.com/z24ckye
x = 2
if x == 2:
print("The number is 2.")
if x % 2 == 0:
print("The number is even.")
if x % 2 != 0:
print("The number is odd.")
\ No newline at end of file
# http://tinyurl.com/zrodgne
x = 10
y = 11
if x == 10:
if y == 11:
print(x + y)
\ No newline at end of file
# http://tinyurl.com/jpr265j
home = "Thailand"
if home == "Japan":
print("Hello, Japan!")
elif home == "Thailand":
print("Hello, Thailand!")
elif home == "India":
print("Hello, India!")
elif home == "China":
print("Hello, China!")
else:
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/zdvuuhs
home = "Mars"
if home == "America":
print("Hello, America!")
elif home == "Canada":
print("Hello, Canada!")
elif home == "Thailand":
print("Hello, Thailand!")
elif home == "Mexico":
print("Hello, Mexico!")
else:
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/hzyxgf4
x = 100
if x == 10:
print("10!")
elif x == 20:
print("20!")
else:
print("I don't know!")
if x == 100:
print("x is 100!")
if x % 2 == 0:
print("x is even!")
else:
print("x is odd!")
\ No newline at end of file
# http://tinyurl.com/jrowero
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/zfz3eel
for i in range(100):
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/hpwkdo4
x = 100
if x == 10:
print("10!")
elif x == 20:
print("20!")
else:
print("I don't know!")
if x == 100:
print("x is 100!")
if x % 2 == 0:
print("x is even!")
else:
print("x is odd!")
\ No newline at end of file
# http://tinyurl.com/zlgcwoc
print("Michael")
print("Jordan")
\ No newline at end of file
# http://tinyurl.com/h4qntgk
for i in range(100):
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/hut6nwu
# 这是一行注释
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/jpzlwqq
# 打印 Hello, World!
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/z52c8z8
import math
# 对角线的长度
l = 4
w = 10
d = math.sqrt(l**2+ w**2)
\ No newline at end of file
# http://tinyurl.com/zh5g2a3
print("Python")
\ No newline at end of file
# http://tinyurl.com/jq2w5ro
# 第一行
# 第二行
# 第三行
\ No newline at end of file
# http://tinyurl.com/zcdx3yo
print("""This is a really really
really really long line of
code.""")
\ No newline at end of file
# http://tinyurl.com/hjcf2sa
print\
("""This is a really really
really long line of code.""")
\ No newline at end of file
# http://tinyurl.com/glp9xq6
for i in range(100):
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/hwa2zae
# 这是一个 JavaScript 程序
# 不过没法执行
for (i = 0; i < 100; i++) {
console.log("Hello, World!");
}
\ No newline at end of file
# http://tinyurl.com/hh5kjwp
"Hello, World!"
\ No newline at end of file
# http://tinyurl.com/guoc4gy
2.2 + 2.2
\ No newline at end of file
# http://tinyurl.com/hw64mrr
b = 100
b
\ No newline at end of file
# http://tinyurl.com/hw97que
x = 100
x
x = 200
x
\ No newline at end of file
# http://tinyurl.com/z8hv5j5
x = 10
y = 10
z = x + y
z
a = x - y
a
\ No newline at end of file
# http://tinyurl.com/zvzf786
x = 10
x = x + 1
x
\ No newline at end of file
# http://tinyurl.com/gmuzdr9
x = 10
x = x - 1
x
\ No newline at end of file
# http://tinyurl.com/zdva5wq
x = 10
x += 1
x
\ No newline at end of file
# http://tinyurl.com/jsygqcy
hi = "Hello, World!"
# http://tinyurl.com/h47ty49
my_float = 2.2
# http://tinyurl.com/hx9xluq
my_boolean = True
\ No newline at end of file
# http://tinyurl.com/j7c2npf
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/h79ob7s
for i in range(100):
print("Hello, World!")
\ No newline at end of file
# http://tinyurl.com/zptktex
x = 100
print(x)
\ No newline at end of file
# http://tinyurl.com/hmwr4kd
print(100)
\ No newline at end of file
# 请不要运行代码
f(x) = x * 2
\ No newline at end of file
# 请不要执行代码
def [函数名]([参数]):
[函数定义]
\ No newline at end of file
# http://tinyurl.com/j9dctwl
def f(x):
return x * 2
\ No newline at end of file
# http://tinyurl.com/zheas3d
# 接上一个示例
f(2)
\ No newline at end of file
# http://tinyurl.com/gspjcgj
# 接上一个示例
result = f(2)
print(result)
\ No newline at end of file
# http://tinyurl.com/znqp8fk
def f(x):
return x + 1
z = f(4)
if z == 5:
print("z is 5")
else:
print("z is not 5")
\ No newline at end of file
# http://tinyurl.com/htk7tr6
def f():
return 1 + 1
result = f()
print(result)
\ No newline at end of file
# http://tinyurl.com/gqmkft7
def f(x, y, z):
return x + y + z
result = f(1, 2, 3)
print(result)
\ No newline at end of file
# http://tinyurl.com/j8qyqov
def f():
z = 1 + 1
result = f()
print(result)
\ No newline at end of file
# http://tinyurl.com/zfkzqw6
len("Monty")
\ No newline at end of file
# http://tinyurl.com/juzxg2z
str(100)
\ No newline at end of file
# http://tinyurl.com/j42qhkf
int("1")
\ No newline at end of file
# http://tinyurl.com/hnk8gh2
fload(100)
\ No newline at end of file
# http://tinyurl.com/jcchmlx
int("110")
int(20.54)
float("16.4")
float(99)
\ No newline at end of file
# http://tinyurl.com/zseo21s
int("Prince")
\ No newline at end of file
# http://tinyurl.com/zynprpg
age = input("Enter your age:")
int_age = int(age)
if int_age < 21:
print("You are young!")
else:
print("Wow, you are old!")
\ No newline at end of file
# http://tinyurl.com/zhy8y4m
def even_odd(x):
if x % 2 == 0:
print("even")
else:
print("odd")
even_odd(2)
even_odd(3)
\ No newline at end of file
# http://tinyurl.com/jk8lugl
n = input("type a number:")
n = int(n)
if n % 2 == 0:
print("n is even.")
else:
print("n is odd.")
n = input("type a number:")
n = int(n)
if n % 2 == 0:
print("n is even.")
else:
print("n is odd.")
n = input("type a number:")
n = int(n)
if n % 2 == 0:
print("n is even.")
else:
print("n is odd.")
\ No newline at end of file
# http://tinyurl.com/zzn22mz
def even_odd():
n = input("type a number:")
n = int(n)
if n % 2 == 0:
print("n is even.")
else:
print("n is odd.")
even_odd()
even_odd()
even_odd()
\ No newline at end of file
# http://tinyurl.com/h3ych4h
def f(x=2):
return x ** x
print(f())
print(f(4))
\ No newline at end of file
# http://tinyurl.com/hm5svn9
def add_it(x, y=10):
return x + y
result = add_it(2)
print(result)
\ No newline at end of file
# http://tinyurl.com/zhmxnqt
x = 1
y = 2
z = 3
\ No newline at end of file
# http://tinyurl.com/hgvnj4p
x = 1
y = 2
z = 3
def f():
print(x)
print(y)
print(z)
f()
\ No newline at end of file
# http://tinyurl.com/znka93k
def f():
x = 1
y = 2
z = 3
print(x)
print(y)
print(z)
\ No newline at end of file
# http://tinyurl.com/z2k3jds
def f():
x = 1
y = 2
z = 3
print(x)
print(y)
print(z)
f()
\ No newline at end of file
# http://tinyurl.com/zn8zjmr
if x > 100:
print("x is > 100")
\ No newline at end of file
# http://tinyurl.com/zclmda7
x = 100
def f():
global x
x += 1
print(x)
f()
\ No newline at end of file
# http://tinyurl.com/jcg5qwp
a = input("type a nubmer:")
b = input("type another:")
a = int(a)
b = int(b)
print(a / b)
\ No newline at end of file
# http://tinyurl.com/ztpcjs4
a = input("type a nubmer:")
b = input("type another:")
a = int(a)
b = int(b)
print(a / b)
\ No newline at end of file
# http://tinyurl.com/j2scn4f
a = input("type a nubmer:")
b = input("type another:")
a = int(a)
b = int(b)
try:
print(a / b)
except ZeroDivisionError:
print("b cannot be zero.")
\ No newline at end of file
a = input("type a nubmer:")
b = input("type another:")
a = int(a)
b = int(b)
try:
print(a / b)
except ZeroDivisionError:
print("b cannot be zero.")
\ No newline at end of file
# http://tinyurl.com/jlus42v
try:
a = input("type a nubmer:")
b = input("type another:")
a = int(a)
b = int(b)
print(a / b)
except (ZeroDivisionError,
ValueError):
print("Invalid input.")
\ No newline at end of file
# http://tinyurl.com/hockur5
try:
10 / 0
c = "I will never get defined."
except ZeroDivisionError:
print(c)
\ No newline at end of file
# http://tinyurl.com/zhahdcg
def add(x, y):
"""
返回 x + y 的值
:param x: int.
:param y: int.
:return: int, x 与 y 之和
"""
return x + y
\ No newline at end of file
# http://tinyurl.com/zdllght
"Hello".upper()
\ No newline at end of file
# http://tinyurl.com/h4go6kg
fruit = list()
fruit
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册