Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13-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
c711771d
authored
Jul 17, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
44fc8d6a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
diy.py
diy.py
View file @
c711771d
with
open
(
"C:
\\
Users
\\
稚慧人生
\\
Desktop
\\
sdgg.txt"
,
'r'
,
encoding
=
'utf-8'
)
as
sb1hlbw
:
while
True
:
a
=
sb1hlbw
.
readliness
()
o
=
input
(
"请输入图形:"
)
for
i
in
a
:
if
o
==
'正方形'
:
print
(
i
)
a
=
int
(
input
(
'正方形的长:'
))
\ No newline at end of file
b
=
int
(
input
(
'正方形的宽:'
))
print
(
'三角形面积是:'
,
a
*
b
)
if
o
==
'三角形'
:
a
=
int
(
input
(
'三角形的长:'
))
b
=
int
(
input
(
'三角形的宽:'
))
print
(
'三角形面积是:'
,
a
*
b
*
0.5
)
\ 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