Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13-4
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
a964d8ce
authored
May 19, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
62f267c9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
6 deletions
diy.py
g.py
k.py
v.py
diy.py
View file @
a964d8ce
...
...
@@ -2,8 +2,5 @@ file = open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',en
a
=
file
.
readlines
()
for
i
in
a
:
data
=
i
.
split
()
sum
=
0
for
sales
in
data
[
1
:]:
sum
=
sum
+
int
(
sales
)
result
=
data
[
0
]
+
str
(
sum
)
print
(
result
)
\ No newline at end of file
print
(
data
[
0
])
print
(
data
[
1
:])
\ No newline at end of file
g.py
0 → 100644
View file @
a964d8ce
n
=
input
()
x
=
int
(
input
()
.
split
())
m
=
0
k
=
[]
for
i
in
x
:
if
i
<
x
[
m
]:
k
.
append
(
1
)
else
:
k
.
append
(
0
)
k.py
0 → 100644
View file @
a964d8ce
x
=
int
(
input
())
p
=
[]
if
x
>
4
and
x
<
12
:
p
.
append
(
1
)
else
:
p
.
append
(
0
)
if
x
>
4
and
x
<
12
or
x
%
2
==
0
:
p
.
append
(
1
)
else
:
p
.
append
(
0
)
if
x
>
4
and
x
<
12
or
x
%
2
==
0
:
if
x
%
1
==
0
:
p
.
append
(
1
)
else
:
p
.
append
(
0
)
if
not
x
>
4
and
x
<
12
or
x
%
2
==
0
:
if
x
%
1
==
0
:
p
.
append
(
1
)
else
:
p
.
append
(
0
)
print
(
p
)
\ No newline at end of file
v.py
0 → 100644
View file @
a964d8ce
print
(
int
(
input
(
'乘数1 '
))
*
int
(
input
(
'乘数2 '
)))
\ 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