Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-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
1bac3210
authored
Jul 02, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a987b816
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
task1.py
task2.py
task1.py
0 → 100644
View file @
1bac3210
list
=
[
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
,
"星期天"
]
date
=
input
(
"今天星期几呀?"
)
if
date
in
list
:
if
date
==
(
"星期一"
):
print
(
"今天学钢琴~"
)
elif
date
==
(
"星期三"
):
print
(
"今天学编程~"
)
elif
date
==
(
"星期六"
):
print
(
"今天学英语~"
)
else
:
print
(
"今天学国学~"
)
else
:
print
(
"输入错误"
)
\ No newline at end of file
task2.py
0 → 100644
View file @
1bac3210
import
random
name
=
input
(
"创造师你叫什么呀?"
)
list
=
[
"ipad"
,
"玩偶"
,
"一台相机"
]
gift
=
random
.
choice
(
list
)
print
(
"恭喜你,幸运的创造师——"
+
name
+
",获得了"
gift
)
\ 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