Skip to content

Commit

Permalink
cartonPython lesson5 adding
Browse files Browse the repository at this point in the history
  • Loading branch information
snow feng committed Dec 24, 2023
1 parent 251f72b commit 54c028b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
Binary file not shown.
6 changes: 6 additions & 0 deletions CartonPython/lesson2/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/python
# Filename : helloworld.py

import world
print (world.x)

5 changes: 5 additions & 0 deletions CartonPython/lesson2/world.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# coding=utf-8

x = '你好'

print (x)
13 changes: 13 additions & 0 deletions CartonPython/lesson5/ch5_1_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# coding=utf-8
# Filename: ch5_1_1.py

score = int(input("请输入一个0~100整数:"))

if score >= 85:
print("你真优秀")

if score < 60:
print("你需要加倍努力!")

if (score >= 60) and (score < 85):
print("你的成绩还不错!")
12 changes: 12 additions & 0 deletions CartonPython/lesson5/ch5_1_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# coding=utf-8
# Filename: ch5_1_2.py

score = int(input("请输入一个0~100的整数:"))

if score >= 60:
if score >= 85:
print("你真优秀!")
else:
print("你的成绩还可以!")
else:
print("你需要加倍努力!")
4 changes: 4 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/python
# Filename : helloworld.py
print ('Hello World')
print ('i love you mom')
print ('我是你爹')
print ('世界,你好')
# 这是一句话

0 comments on commit 54c028b

Please sign in to comment.