Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
cf16ddc
Create test
LanguageResources Oct 1, 2017
8e8fdd4
Create readme.md
LanguageResources Oct 7, 2017
0eeead5
Create 8-10
LanguageResources Oct 7, 2017
6dc1e19
Delete 8-10
LanguageResources Oct 7, 2017
06387f9
Create readme.md
LanguageResources Oct 7, 2017
c255f19
Create test
LubbyAnneLiu Oct 10, 2017
1605943
Add files via upload
LubbyAnneLiu Oct 10, 2017
8928853
Create README
JShanPP Oct 10, 2017
1ca02e4
Delete test
LubbyAnneLiu Oct 10, 2017
4d71512
Create test
JShanPP Oct 10, 2017
00c0d9c
Rename 8-10/201721198590/[1]201721198590.ipynb to 8-10/201721198590/c…
LubbyAnneLiu Oct 10, 2017
18e9ced
Delete README
JShanPP Oct 10, 2017
9c7a7f2
Rename 8-10/201721198590/chapter/1.ipynb to 8-10/201721198590/chapter…
LubbyAnneLiu Oct 10, 2017
218b378
Add files via upload
JShanPP Oct 10, 2017
317f835
Delete test
JShanPP Oct 10, 2017
079be82
Create 杨丽雪
ylxuer Oct 10, 2017
9b8743b
Delete 杨丽雪
ylxuer Oct 10, 2017
01fbe89
Create me
ylxuer Oct 10, 2017
e239c93
Create test.md
Oct 10, 2017
b804fcf
Create 1
Oct 10, 2017
0113587
Add files via upload
Oct 10, 2017
bf3d578
Add files via upload
ylxuer Oct 11, 2017
30f6b9f
Create text.html
maluyaoMoMo Oct 15, 2017
2e47314
Create tet.html
maluyaoMoMo Oct 15, 2017
a5729d3
Add files via upload
maluyaoMoMo Oct 15, 2017
06e0e79
Merge pull request #1 from maluyaoMoMo/maluyaoMoMo-patch-1
maluyaoMoMo Oct 15, 2017
5cc2b62
Delete tet.html
maluyaoMoMo Oct 15, 2017
c38bdd4
Delete 2md-3md.ipynb
maluyaoMoMo Oct 15, 2017
2b8895b
Create makedir.html
maluyaoMoMo Oct 15, 2017
92391b9
Add files via upload
maluyaoMoMo Oct 15, 2017
b3a8998
Merge pull request #2 from maluyaoMoMo/maluyaoMoMo-patch-2
maluyaoMoMo Oct 15, 2017
fd0c505
Create 杨瑞霞
yangruixia Oct 17, 2017
a8cffeb
Delete 杨瑞霞
yangruixia Oct 17, 2017
1dbcf21
Create 201721198327
zhushucheng Oct 17, 2017
52d334d
Delete 201721198327
zhushucheng Oct 17, 2017
fdcddc9
Create 0
zhushucheng Oct 17, 2017
ff25af1
Delete 0
zhushucheng Oct 17, 2017
9e7d963
Create 2
zhushucheng Oct 17, 2017
45c1d35
Merge pull request #1 from LubbyAnneLiu/master
LanguageResources Oct 17, 2017
ebe0374
Merge pull request #2 from JShanPP/master
LanguageResources Oct 17, 2017
0128892
Merge pull request #3 from renhongkai/master
LanguageResources Oct 17, 2017
a6f52c7
Merge pull request #4 from renhongkai/patch-1
LanguageResources Oct 17, 2017
c28f6e4
Merge pull request #5 from maluyaoMoMo/patch-2
LanguageResources Oct 17, 2017
b0d13c6
Merge pull request #6 from maluyaoMoMo/master
LanguageResources Oct 17, 2017
66fc530
Merge pull request #7 from yangruixia/master
LanguageResources Oct 17, 2017
634b326
Rename 201721198583/test.md to 8-10/201721198583
LanguageResources Oct 17, 2017
8dfa517
Delete 201721198583
LanguageResources Oct 17, 2017
356b7e9
Rename 201721198583/1.ipynb to 8-10/201721198583/1.ipynb
LanguageResources Oct 17, 2017
91b99fb
Delete 1
LanguageResources Oct 17, 2017
3690696
Rename 8-10/201721198590/chapter1/1.ipynb to 8-10/201721198590/1.ipynb
LanguageResources Oct 17, 2017
a7343d5
Rename 8-10/201721198594/chapter1/1.ipynb to 8-10/201721198594/1.ipynb
LanguageResources Oct 17, 2017
ee4566c
Rename 2md-3md.ipynb to 1.ipynb
LanguageResources Oct 17, 2017
d9ca28a
Create 2.ipynb
ylxuer Oct 17, 2017
617ccbf
Delete 2.ipynb
ylxuer Oct 17, 2017
9a1b868
Create 1.ipynb
ylxuer Oct 17, 2017
4d793f7
Delete 1.ipynb
ylxuer Oct 17, 2017
e9809e4
Create me
ylxuer Oct 17, 2017
246ff6b
Add files via upload
ylxuer Oct 17, 2017
dbbd038
Add files via upload
zhushucheng Oct 17, 2017
1f2ded0
Delete 2
zhushucheng Oct 17, 2017
8899e1c
Merge pull request #1 from LanguageResources/master
ylxuer Oct 17, 2017
652eb1d
Delete 1.ipynb
ylxuer Oct 17, 2017
340a5a8
Delete 1.ipynb
ylxuer Oct 17, 2017
4add3e8
Delete makedir.html
ylxuer Oct 17, 2017
eddcaa5
Delete text.html
ylxuer Oct 17, 2017
74f4756
Delete 1.ipynb
ylxuer Oct 17, 2017
195e904
Delete 1.ipynb
ylxuer Oct 17, 2017
32ecadd
Add files via upload
zhushucheng Oct 17, 2017
4741c50
Merge pull request #8 from zhushucheng/master
LanguageResources Oct 17, 2017
5f99bec
Add files via upload
Oct 18, 2017
102af64
Merge pull request #9 from renhongkai/master
LanguageResources Oct 18, 2017
108bd9e
Delete 3.ipynb
zhushucheng Oct 18, 2017
c6db12b
Add files via upload
zhushucheng Oct 18, 2017
680d1fd
Merge pull request #10 from zhushucheng/master
LanguageResources Oct 18, 2017
d93716e
Create test.html
BWendy1 Oct 18, 2017
cb3b0cd
Create he.txt
BWendy1 Oct 18, 2017
f449269
Add files via upload
BWendy1 Oct 18, 2017
cac3a67
Add files via upload
BWendy1 Oct 18, 2017
8cb5498
Merge pull request #1 from BWendy1/BWendy1-patch-1
BWendy1 Oct 18, 2017
bfbba35
Merge pull request #2 from LanguageResources/master
ylxuer Oct 18, 2017
0db8266
Merge pull request #12 from BWendy1/master
LanguageResources Oct 18, 2017
9e95af1
Merge pull request #11 from BWendy1/patch-2
LanguageResources Oct 18, 2017
2c909f2
Merge pull request #1 from LanguageResources/master
LiangsLi Oct 18, 2017
b857f43
Add files via upload
CSerV Oct 18, 2017
735e25d
Create 201721198591
CSerV Oct 18, 2017
9bb6cc8
Delete 201721198591
CSerV Oct 18, 2017
b7736c8
Delete 2.ipynb
CSerV Oct 18, 2017
cf02251
Delete 3.ipynb
CSerV Oct 18, 2017
8cc420a
Create 2.ipynb
siqizhu Oct 18, 2017
0e6bb0d
Delete 2.ipynb
siqizhu Oct 18, 2017
e6b5829
Create readme.md
siqizhu Oct 18, 2017
e18fb24
Add files via upload
siqizhu Oct 18, 2017
de7f2fe
Delete readme.md
siqizhu Oct 18, 2017
31c4001
Merge pull request #14 from siqizhu/master
LanguageResources Oct 18, 2017
a6c166c
Delete 2.ipynb
ylxuer Oct 18, 2017
ad7008b
Delete 3.ipynb
ylxuer Oct 18, 2017
96aeb92
Delete 2.ipynb
ylxuer Oct 18, 2017
77ae32d
Create 201721198595
dongwenwei123 Oct 18, 2017
db31687
Delete 3.ipynb
ylxuer Oct 18, 2017
f2efe58
Delete 201721198595
dongwenwei123 Oct 18, 2017
94dba8e
Create 1.txt
dongwenwei123 Oct 18, 2017
53cc09a
Add files via upload
dongwenwei123 Oct 18, 2017
dee021c
Delete 1.txt
dongwenwei123 Oct 18, 2017
61f01f6
Create readme.md
dongwenwei123 Oct 18, 2017
97f6b49
Delete readme.md
dongwenwei123 Oct 18, 2017
cceafb4
Create readme.md
CSerV Oct 18, 2017
ff85be6
Add files via upload
CSerV Oct 18, 2017
409cbb3
Delete 2.ipynb
siqizhu Oct 18, 2017
1a33ded
Add files via upload
siqizhu Oct 18, 2017
6ba89f6
Create 4654
du-cheng-yu Oct 18, 2017
2aa0839
Add files via upload
du-cheng-yu Oct 18, 2017
32b292e
Delete 4654
du-cheng-yu Oct 18, 2017
7909317
Create xiao
xiaoxiaoAurora Oct 18, 2017
3d81168
Add files via upload
xiaoxiaoAurora Oct 18, 2017
7205b97
Add files via upload
xiaoxiaoAurora Oct 18, 2017
3b04656
Delete xiao
xiaoxiaoAurora Oct 18, 2017
0428e9f
提交作业1
LiangsLi Oct 18, 2017
102e585
Merge pull request #23 from LiangsLi/master
LanguageResources Oct 18, 2017
74f9888
Merge pull request #19 from CSerV/master
LanguageResources Oct 18, 2017
934af86
Merge pull request #21 from du-cheng-yu/master
LanguageResources Oct 18, 2017
342e910
Merge pull request #22 from xiaoxiaoAurora/master
LanguageResources Oct 18, 2017
7529ca8
Merge pull request #16 from dongwenwei123/master
LanguageResources Oct 18, 2017
5deee70
Merge pull request #20 from siqizhu/master
LanguageResources Oct 18, 2017
225e471
Merge pull request #1 from LanguageResources/master
ccaiai Oct 18, 2017
72d93ca
Create 2.ipynb
ccaiai Oct 18, 2017
633975e
Delete 2.ipynb
ccaiai Oct 18, 2017
4521e1d
Create add
ccaiai Oct 18, 2017
01b8e15
Create add
ccaiai Oct 18, 2017
691e6c8
Add files via upload
ccaiai Oct 18, 2017
4c45e7d
Merge pull request #24 from ccaiai/master
LanguageResources Oct 19, 2017
1271d87
Merge pull request #26 from ylxuer/master
LanguageResources Oct 19, 2017
a856e79
Delete 1.ipynb
LanguageResources Oct 19, 2017
45cbc60
Delete me
LanguageResources Oct 19, 2017
ae5a069
Create han
liyihanxx Oct 19, 2017
9694ef4
Add files via upload
liyihanxx Oct 19, 2017
d324223
Delete han
liyihanxx Oct 19, 2017
1209cdf
Add files via upload
liyihanxx Oct 19, 2017
929f10b
Merge pull request #27 from liyihanxx/master
LanguageResources Oct 19, 2017
959a81b
Create 201721198579
chengyue920 Oct 19, 2017
05638a9
Delete 201721198579
chengyue920 Oct 19, 2017
47489bf
Add files via upload
chengyue920 Oct 19, 2017
758178e
Merge pull request #28 from chengyue920/master
LanguageResources Oct 19, 2017
5c3c3a4
Create 201711680236
xuanchengyu Oct 19, 2017
ac76fe8
Delete 201711680236
xuanchengyu Oct 19, 2017
3278101
Add files via upload
xuanchengyu Oct 19, 2017
4cd6d80
Delete 2md.ipynb
xuanchengyu Oct 19, 2017
6f553ff
Delete 3md.ipynb
xuanchengyu Oct 19, 2017
08a89cf
201711680236
xuanchengyu Oct 19, 2017
e9c5469
Delete 2md.ipynb
xuanchengyu Oct 19, 2017
4ddbcf0
Delete 3md.ipynb
xuanchengyu Oct 19, 2017
33c0082
Create 2,ipynb
xianggu99 Oct 19, 2017
4472e69
Add files via upload
xianggu99 Oct 19, 2017
060778d
Delete 2,ipynb
xianggu99 Oct 19, 2017
d44b93e
Create y
Janexujingyi Oct 19, 2017
19275b1
Add files via upload
Janexujingyi Oct 19, 2017
b1f9847
Delete y
Janexujingyi Oct 19, 2017
4c048c2
Merge pull request #30 from Janexujingyi/master
LanguageResources Oct 19, 2017
7630788
Merge pull request #29 from xianggu99/master
LanguageResources Oct 19, 2017
4e1b071
Delete 2.ipynb
Janexujingyi Oct 20, 2017
fa5a8a9
Add files via upload
Janexujingyi Oct 20, 2017
03441ed
Merge pull request #31 from Janexujingyi/master
LanguageResources Oct 20, 2017
93e4629
Create lmy
lulumengyi Oct 20, 2017
1e3a312
Add files via upload
lulumengyi Oct 20, 2017
6c0f77f
Update 3.ipynb
zhushucheng Oct 20, 2017
73ec7a9
Add files via upload
lulumengyi Oct 20, 2017
cc5468d
Delete 2.ipynb
lulumengyi Oct 20, 2017
4d650a8
Delete 3.ipynb
lulumengyi Oct 20, 2017
1cd85d7
Merge pull request #33 from lulumengyi/master
LanguageResources Oct 20, 2017
d46681d
Delete 2.ipynb
zhushucheng Oct 20, 2017
72bd7f8
Delete 3.ipynb
zhushucheng Oct 20, 2017
3425699
Delete 3.ipynb
xiaoxiaoAurora Oct 20, 2017
b1964e2
Add files via upload
xiaoxiaoAurora Oct 20, 2017
c847160
Merge pull request #35 from xiaoxiaoAurora/master
LanguageResources Oct 20, 2017
e3480e9
Merge pull request #34 from zhushucheng/master
LanguageResources Oct 20, 2017
f5e8020
Create h
zhushucheng Oct 20, 2017
6b676c3
3
zhushucheng Oct 20, 2017
1198f89
2
zhushucheng Oct 20, 2017
85ad910
Delete h
zhushucheng Oct 20, 2017
b145006
Merge pull request #36 from zhushucheng/master
LanguageResources Oct 20, 2017
f1b4aa2
Create 201721198584
mjj1094 Oct 20, 2017
8d101e6
Delete 201721198584
mjj1094 Oct 20, 2017
513af31
Create me
mjj1094 Oct 20, 2017
92faf27
Add files via upload
mjj1094 Oct 20, 2017
8d5c075
Delete me
mjj1094 Oct 20, 2017
4c19624
Create readme.md
xdiandian Oct 20, 2017
d7b1670
作业
xdiandian Oct 20, 2017
03d2d4d
Delete readme.md
xdiandian Oct 20, 2017
d131939
Create 3.ipynb
guominghao Oct 20, 2017
46d79b9
Add files via upload
guominghao Oct 20, 2017
53faf23
Create 2md
xuanchengyu Oct 20, 2017
9f8a8b7
Delete 2md
xuanchengyu Oct 20, 2017
801978f
Create add
xuanchengyu Oct 20, 2017
f4c332b
Add files via upload
xuanchengyu Oct 20, 2017
92f4e8b
Create .add
Sukieee Oct 20, 2017
1606303
Add files via upload
Sukieee Oct 20, 2017
e3e5ed0
Create .add
wangningL Oct 20, 2017
69fada6
Add files via upload
wangningL Oct 20, 2017
1d0bd7b
Create .add
AudreyStacey Oct 20, 2017
2814acc
Add files via upload
AudreyStacey Oct 20, 2017
9508d0e
Merge pull request #45 from AudreyStacey/master
LanguageResources Oct 21, 2017
272f97b
Merge pull request #44 from wangningL/master
LanguageResources Oct 21, 2017
a9904c7
Merge pull request #43 from Sukieee/master
LanguageResources Oct 21, 2017
067e352
Merge pull request #42 from YuXuanchengA/master
LanguageResources Oct 21, 2017
b9a702e
Merge pull request #41 from guominghao/master
LanguageResources Oct 21, 2017
293adcb
Merge pull request #40 from xdiandian/master
LanguageResources Oct 21, 2017
f4d5b7c
Merge pull request #37 from mjj1094/master
LanguageResources Oct 21, 2017
a84351e
Create a
AriaZhangyihan Oct 21, 2017
34a5b20
Add files via upload
AriaZhangyihan Oct 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 19-22/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 晚上19:00-22:00上课的同学,作业目录
1 change: 1 addition & 0 deletions 8-10/201711680007/.add
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

147 changes: 147 additions & 0 deletions 8-10/201711680007/1.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入数字后按下enter进入下一过程8\n",
"数的阶乘 40320\n"
]
}
],
"source": [
"#n的阶乘\n",
"n=int(input('请输入数字后按下enter进入下一过程'))\n",
"total=1\n",
"i=1\n",
"while i < n:\n",
" i=i+1\n",
" total=total*i\n",
"print('数的阶乘',total)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入整数个数3\n",
"请输入整数2\n",
"请输入整数3\n",
"请输入整数1\n",
"数值之和 6\n"
]
}
],
"source": [
"#由用户指定整数个数,并由用户输入多个整数,并求和\n",
"n=int(input(\"请输入整数个数\"))\n",
"i=0\n",
"total=0\n",
"while i < n:\n",
" m=int(input(\"请输入整数\"))\n",
" i=i+1\n",
" total=total+m\n",
"print('数值之和',total)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入一个正整数,以回车结束。3\n",
"请输入一个正整数4\n",
"请输入一个正整数2\n",
"请输入一个正整数9\n",
"请输入一个正整数20\n",
"21 648\n"
]
}
],
"source": [
" #用户可以输入的任意多个数字,直到: 输入所有数字的和比当前输入数字小,且输入所有数字的积大于500\n",
"n = int(input('请输入一个正整数,以回车结束。'))\n",
"total=n\n",
"product=n\n",
"while n<=total and product<=500:\n",
" total=total+n\n",
" product=product*n\n",
" n=int(input('请输入一个正整数'))\n",
"print(total,product)\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入0之外任意整数,如果结束请输入04\n",
"4\n",
"请输入0之外任意整数,如果结束请输入00\n",
"结束\n"
]
}
],
"source": [
"#用户可以输入的任意多个数字,直到用户不想输入为止。\n",
"a=0\n",
"b=1\n",
"while a<b:\n",
" q=int(input('请输入0之外任意整数,如果结束请输入0'))\n",
" if q==0:\n",
" print(\"结束\")\n",
" break \n",
" else:\n",
" print(q)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2rc2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
100 changes: 100 additions & 0 deletions 8-10/201711680007/2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入一个较小数字9\n",
"请输入一个较大数字2\n",
"求和输入1求积输入2求余数输入3取整数输入其他数字3\n",
"求余数结果为 2\n"
]
}
],
"source": [
"m=int(input('请输入一个较小数字'))\n",
"n=int(input('请输入一个较大数字'))\n",
"u=int(input('求和输入1求积输入2求余数输入3取整数输入其他数字'))\n",
"x=n%m\n",
"y=n//m\n",
"total=0\n",
"product=1\n",
"while m<= n:\n",
" total=total+m\n",
" product=product*m\n",
" m=m+1\n",
"if u==1:\n",
" print('求和结果为',total)\n",
"elif u==2:\n",
" print('求积结果为',product)\n",
"elif u==3:\n",
" print('求余数结果为',x)\n",
"else:\n",
" print('取整除结果为',y)\n",
" \n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入一个名词的单数形式toe\n",
"该名词的复数形式为 toes\n"
]
}
],
"source": [
"#英文单词单数转复数,要求输入一个英文名词(单数形式),能够得到其复数形式,或给出单数转复数形式的建议\n",
"#(提示,some_string.endswith(some_letter)函数可以判断某字符串结尾字符,可尝试运行)\n",
"word=input('请输入一个名词的单数形式')\n",
"if word.endswith('s') or word.endswith('ch') or word.endswith('sh') or word.endswith('x'):\n",
" print('该单词的复数形式为',word+'es')\n",
"elif word.endswith('by') or word.endswith('cy') or word.endswith('dy') or word.endswith('fy') or word.endswith('gy') or word.endswith('hy') or word.endswith('jy') or word.endswith('ky') or word.endswith('ly') or word.endswith('my') or word.endswith('ny') or word.endswith ('py') or word.endswith('qy') or word.endswith('ry') or word.endswith ('sy') or word.endswith ('ty') or word.endswith ('vy') or word.endswith ('wy') or word.endswith ('xy') or word.endswith ('yy') or word.endswith('zy'):\n",
" print('该名词的复数形式为', word[0:-1]+'ies')\n",
"elif word.endswith ('f'): \n",
" print('该名词的复数形式为',word[0:-1]+'ves')\n",
"elif word.endswith ('fe'):\n",
" print('该名词的复数形式为',word[0:-2]+'es')\n",
"elif word.endswith ('o'):#piano-pianos, dynamo-dynamos, photo-photos, kimono-kimonos, biro-biros,zoo-zoos,studio-studios, radio-radios除外\n",
" print('该名词的复数形式为',word+'es')\n",
"else:\n",
" print('该名词的复数形式为',word+'s')\n",
"\n",
"\n",
"\n",
" \n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2rc2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
1 change: 1 addition & 0 deletions 8-10/201711680071/.add
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

123 changes: 123 additions & 0 deletions 8-10/201711680071/2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入一个正整数,以回车结束。5\n",
"120\n"
]
}
],
"source": [
"n = int(input('请输入一个正整数,以回车结束。'))\n",
"\n",
"i = 0\n",
"total = 1\n",
"\n",
"while i < n:\n",
" i = i + 1\n",
" total = total *i\n",
" \n",
"print(total)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入你想输入的整数的个数,以回车结束。3\n",
"请输入你想输入的数字,以回车结束。3\n",
"3\n",
"请输入你想输入的数字,以回车结束。4\n",
"4\n",
"请输入你想输入的数字,以回车结束。5\n",
"5\n",
"12\n"
]
}
],
"source": [
"n=int(input('请输入你想输入的整数的个数,以回车结束。'))\n",
"\n",
"i=0\n",
"total=0\n",
"while i<n:\n",
" m=int(input('请输入你想输入的数字,以回车结束。'))\n",
" print(m)\n",
" i=i+1\n",
" total=total+m\n",
"\n",
"print(total) "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"i=2\n",
"while i>1:\n",
" n=int(input('请输入你想输入的数字,以回车结束。'))"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"请输入你想输入的数字,以回车结束。66\n",
"请继续输入你想输入的数字,以回车结束。88\n",
"请继续输入你想输入的数字,以回车结束。8787878\n"
]
}
],
"source": [
"n=int(input('请输入你想输入的数字,以回车结束。'))\n",
"total=0\n",
"product=1\n",
"\n",
"while total>=n or product<=500: \n",
" total=total+n\n",
" product=product*n \n",
" n=int(input('请继续输入你想输入的数字,以回车结束。'))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading