Skip to content

adding one more print function to do_print.py #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions samples/basic/do_for.py
Original file line number Diff line number Diff line change
@@ -9,3 +9,9 @@
# 打印数字 0 - 9
for x in range(10):
print(x)

# third example

age = ('bob', 'mick')
for ages in age:
print(ages)
9 changes: 9 additions & 0 deletions samples/basic/do_if.py
Original file line number Diff line number Diff line change
@@ -13,3 +13,12 @@
print('teenager')
else:
print('kid')

# second example

quiz = input("what is third planet on our solar system")

if quiz == "earth":
print("correct")
else:
print("wrong")
5 changes: 5 additions & 0 deletions samples/basic/do_input.py
Original file line number Diff line number Diff line change
@@ -3,3 +3,8 @@

name = input()
print('Hello,', name)

# second example

age = input("what is your age")
print(" your age is," age)
1 change: 1 addition & 0 deletions samples/basic/do_print.py
Original file line number Diff line number Diff line change
@@ -5,3 +5,4 @@
print(300)
print(100 + 200)
print('100 + 200 =', 100 + 200)
print("1/2 + 1/2")