Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosassebastian2003/hello-world
https://github.com/rosassebastian2003/hello-world
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rosassebastian2003/hello-world
- Owner: RosasSebastian2003
- Created: 2023-10-23T16:03:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-27T21:37:09.000Z (about 1 year ago)
- Last Synced: 2023-10-27T22:32:43.536Z (about 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hello-world
# Nombre: Sebastian Rosas Maciel
# Matricua: A01233989
# Carrera: ITC
# Semestre: 4to
---
**Bold Semana Tec 12**
*Italic*
---
1. Chilaquiles
2. Galletas
3. Pan Dulce
4. Galletas
5. Chanwis???
---
- Piano
- Guitarra
- Bajo
- Mandolina---
'''Python
"""Paint, for drawing shapes.Exercises
1. Add a color.
2. Complete circle.
3. Complete rectangle.
4. Complete triangle.
5. Add width parameter.
"""from turtle import *
from freegames import vector
def line(start, end):
"""Draw line from start to end."""
up()
goto(start.x, start.y)
down()
goto(end.x, end.y)def square(start, end):
"""Draw square from start to end."""
up()
goto(start.x, start.y)
down()
begin_fill()for count in range(4):
forward(end.x - start.x)
left(90)end_fill()
def circle(start, end):
"""Draw circle from start to end."""
pass # TODOdef rectangle(start, end):
"""Draw rectangle from start to end."""
pass # TODOdef triangle(start, end):
"""Draw triangle from start to end."""
pass # TODOdef tap(x, y):
"""Store starting point or draw shape."""
start = state['start']if start is None:
state['start'] = vector(x, y)
else:
shape = state['shape']
end = vector(x, y)
shape(start, end)
state['start'] = Nonedef store(key, value):
"""Store value in state at key."""
state[key] = valuestate = {'start': None, 'shape': line}
setup(420, 420, 370, 0)
onscreenclick(tap)
listen()
onkey(undo, 'u')
onkey(lambda: color('black'), 'K')
onkey(lambda: color('white'), 'W')
onkey(lambda: color('green'), 'G')
onkey(lambda: color('blue'), 'B')
onkey(lambda: color('red'), 'R')
onkey(lambda: store('shape', line), 'l')
onkey(lambda: store('shape', square), 's')
onkey(lambda: store('shape', circle), 'c')
onkey(lambda: store('shape', rectangle), 'r')
onkey(lambda: store('shape', triangle), 't')
done()
---
| Nombre | Actividad |
| ------- | ------ |
| Sebastian | Chambear |- [x] Sebastian Chambear