Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_1
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
f5ecb3a3
authored
May 19, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
63a36635
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
210 additions
and
9 deletions
diy.ry
func.py
diy.ry
View file @
f5ecb3a3
...
...
@@ -13,7 +13,202 @@ def new_input():
total.append(unit)
print(total)
new_input()
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
PS C:\Users\86185\Documents\lesson11_1> & C:/Users/86185/AppData/Roaming/pythonWin/python.exe c:/Use==================
File "c:/Users/86185/Documents/lesson11_1/func.py", line 23, in <module>
NameError: name 'result' is not defined
1
1
1
1
1
1
1
1
PS C:\Users\86185\Documents\lesson11_1> 1
PS C:\Users\86185\Documents\lesson11_1> 1
PS C:\Users\86185\Documents\lesson11_1> 1
PS C:\Users\86185\Documents\lesson11_1> 1
PS C:\Users\86185\Documents\lesson11_1> 1
PS C:\Users\86185\Documents\lesson11_1> 11
PS C:\Users\86185\Documents\lesson11_1>
1
PS C:\Users\86185\Documents\lesson11_1>
1
2
3
232
234
343
423
5443
PS C:\Users\86185\Documents\lesson11_1> 4234
PS C:\Users\86185\Documents\lesson11_1> 24
PS C:\Users\86185\Documents\lesson11_1> 25234568435678456257634596347853467583
PS C:\Users\86185\Documents\lesson11_1> 34563425
PS C:\Users\86185\Documents\lesson11_1> 345
PS C:\Users\86185\Documents\lesson11_1> 345
PS C:\Users\86185\Documents\lesson11_1> 2354234
PS C:\Users\86185\Documents\lesson11_1> 554345
PS C:\Users\86185\Documents\lesson11_1> 345
345
PS C:\Users\86185\Documents\lesson11_1> 3453
3453
PS C:\Users\86185\Documents\lesson11_1> 45
45
PS C:\Users\86185\Documents\lesson11_1> 53
53
535
PS C:\Users\86185\Documents\lesson11_1> 345
345
PS C:\Users\86185\Documents\lesson11_1> 345
345
PS C:\Users\86185\Documents\lesson11_1> 34534
34534
PS C:\Users\86185\Documents\lesson11_1> 534
534
所在位置 行:1 字符: 1
+ 534terfegrtg
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (534terfegrtg:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> hftygfdvbcngkurtghyt
hftygfdvbcngkurtghyt : 无法将“hftygfdvbcngkurtghyt”项识别为 cmdlet、函数、脚本文件或可运行程序的
+ hftygfdvbcngkurtghyt
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (hftygfdvbcngkurtghyt:String) [], CommandNotFoundExc
eption
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1>
PS C:\Users\86185\Documents\lesson11_1>
thghdghrh : 无法将“thghdghrh”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写
,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ thghdghrh
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (thghdghrh:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> b
b : 无法将“b”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,
请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ b
+ ~
+ CategoryInfo : ObjectNotFound: (b:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> g
g : 无法将“g”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,
请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ g
+ ~
+ CategoryInfo : ObjectNotFound: (g:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> fb
fb : 无法将“fb”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径
,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ fb
+ ~~
+ CategoryInfo : ObjectNotFound: (fb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> g
g : 无法将“g”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,
请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ g
+ ~
+ CategoryInfo : ObjectNotFound: (g:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ fb
+ ~~
+ CategoryInfo : ObjectNotFound: (fb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> srtheytjyteyhghjbvghch bhg
序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ srtheytjyteyhghjbvghch bhg
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (srtheytjyteyhghjbvghch:String) [], CommandNotFoundE
xception
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> b v
b : 无法将“b”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,
请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ b v
+ ~
+ CategoryInfo : ObjectNotFound: (b:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> gvbhj
gvbhj : 无法将“gvbhj”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包
括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ gvbhj
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (gvbhj:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> nbvg
nbvg : 无法将“nbvg”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括
路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ nbvg
+ ~~~~
+ CategoryInfo : ObjectNotFound: (nbvg:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> vbhghvbc
vbhghvbc : 无法将“vbhghvbc”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,
如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ vbhghvbc
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (vbhghvbc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> bghfy
bghfy : 无法将“bghfy”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包
括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ bghfy
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (bghfy:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> cvxb
cvxb : 无法将“cvxb”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括
路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ cvxb
+ ~~~~
+ CategoryInfo : ObjectNotFound: (cvxb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> hvgfd
hvgfd : 无法将“hvgfd”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包
括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ hvgfd
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (hvgfd:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> sxc v
sxc : 无法将“sxc”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路
径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ sxc v
+ ~~~
+ CategoryInfo : ObjectNotFound: (sxc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\86185\Documents\lesson11_1> fdce435wtryguthfij
...
...
func.py
View file @
f5ecb3a3
def
new_input
():
total
=
[]
while
True
:
money
=
input
(
"请输入q退出"
)
if
money
==
'q'
:
unit
=
input
(
"请输入q退出"
)
if
unit
==
'q'
:
break
else
:
try
:
moneyq
=
int
(
money
)
unit
=
int
(
unit
)
except
:
print
(
'重新输入一个数字'
)
else
:
total
.
append
(
money
)
total
.
append
(
unit
)
finally
:
print
(
"
-"
*
30
)
print
(
"
=================="
)
return
total
def
sun
(
money
):
count
=
0
for
i
in
money
:
count
=
count
+
i
return
count
resuit
=
new_input
()
print
(
total
)
price
(
result
)
pay
=
sun
(
prce
)
str
(
pay
)
print
(
"消费了"
pay
"元"
)
...
...
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