Skip to content
Open
Show file tree
Hide file tree
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
21 changes: 18 additions & 3 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,27 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: Run a one-line script
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install tools
run: |
python -m pip install --upgrade pip
pip install ruff

- name: Lint Python files with ruff
run: |
ruff --version
ruff check --output-format=github --exit-non-zero-on-fix . || true

# Runs a one-line script using the runners shell
- name: Say hello
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Next steps
run: |
echo Add other actions to build,
echo test, and deploy your project.
23 changes: 10 additions & 13 deletions Chapter I
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
#Situation 1:
a = you
b = human
if a = b:
# Situation 1:
a = "you"
b = "human"
if a == b:
print("a=b")
print("You are loser")


# Situation 2:

a = you
b = human
if a b:
print("ab")
a = "you"
b = "human"
if a != b:
print("a!=b")
print("You are animal loser")
'''



# Quiz
age = int(input("your age:"))
age = int(input("your age: "))
if age >= 0:
print("You are loser!")
37 changes: 19 additions & 18 deletions Chapter III
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
>>> import turtle as t #Import turtle pixel module
>>> t.forward(100) #Go forward 100 steps
>>> t.shape('turtle') #Set the shape of turtle as turtle appearance
>>> t.shape('arrow')
>>> t.right(90) #Take 90 degree right turn #draw a square:
>>> t.forward(100) #Go forward 100 steps,draw the second side
>>> t.right(90)
>>> t.forward(100) #Draw the third side
>>> t.right(90)
>>> t.forward(100) #Draw the fourth side
>>> t.speed("slow")
>>> t.circle(100) #Draw a circle with a radius of 100 with the current position as the center
>>> t.ht() #Hide the turtle
>>> t.isvisible() #Query the turtle display status
False
>>> t.st() #Display the turtle
>>> t.isvisible() #Query the turtle display status
True
import turtle as t

t.shape("turtle")
t.speed("slow")

# Draw a square
for _ in range(4):
t.forward(100)
t.right(90)

# Draw a circle
t.circle(100)

# Toggle visibility
t.ht()
t.st()

# Keep the window open until clicked
t.exitonclick()
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# Failureology
A curriculum about losers
A small collection of text files and simple Python exercises.

## Run the Python examples
- Chapter I (console input):
```
python3 "Chapter I"
```
- Chapter III (turtle graphics):
```
python3 "Chapter III"
```
Binary file added __pycache__/Chapter IIIcpython-313.pyc
Binary file not shown.
Binary file added __pycache__/Chapter Icpython-313.pyc
Binary file not shown.