Skip to content

Commit 8252c4c

Browse files
committed
Agrego nuevo diagrama
1 parent e7859fa commit 8252c4c

8 files changed

Lines changed: 334 additions & 392 deletions

File tree

slides/01.pdf

-12.1 KB
Binary file not shown.

slides/01.typ

Lines changed: 127 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1-
#import "@preview/polylux:0.4.0": *
1+
#import "@preview/touying:0.6.1": *
22
#import "@preview/codly:1.3.0": *
33
#import "@preview/codly-languages:0.1.10": *
44
#import "@preview/gentle-clues:1.3.1": *
55
#import "@preview/pinit:0.2.2": *
66

77
#import "@preview/fletcher:0.5.8" as fletcher: diagram, node, edge
8-
#import fletcher.shapes: diamond
98

10-
#import "template.typ": setup-template, new-section-slide, inverted-slide
9+
#import fletcher.shapes: diamond, ellipse
10+
#import "template.typ": (
11+
code-annotation,
12+
inverted-slide,
13+
item-by-item,
14+
later,
15+
new-section-slide,
16+
reveal-code,
17+
setup-template,
18+
)
19+
20+
21+
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)
1122

1223
#show: codly-init.with()
1324
#codly(
@@ -20,7 +31,7 @@
2031

2132
#show: setup-template.with(
2233
title: [Conociendo Python],
23-
subtitle: [Tomás Capretto \ \ Enero 2026],
34+
subtitle: [Tomás Capretto \ \ Marzo 2026],
2435
course-name: "Programación en Python",
2536
title-header: "Clase 1"
2637
)
@@ -29,7 +40,7 @@
2940

3041
#slide[
3142
= Python en una _slide_
32-
#toolbox.side-by-side(gutter: 3mm, columns: (2fr, 1fr))[
43+
#components.side-by-side(gutter: 3mm, columns: (2fr, 1fr))[
3344
#set text(size: 1.2em)
3445
#item-by-item[
3546
- Lenguaje interpretado
@@ -51,7 +62,7 @@
5162
#slide[
5263
= Positron en una _slide_
5364

54-
#toolbox.side-by-side(gutter: 3mm, columns: (2fr, 1fr))[
65+
#components.side-by-side(gutter: 3mm, columns: (2fr, 1fr))[
5566
#set text(size: 1.2em)
5667
#item-by-item[
5768
- Editor de código
@@ -322,11 +333,15 @@
322333

323334
#show: later
324335

336+
#v(3em)
337+
325338
Por ahora, conformémonos con decir que un método es una función a la que se puede acceder a
326339
través de un objeto.
327340

328341
#show: later
329342

343+
#v(3em)
344+
330345
Las cadenas de texto implementan una gran variedad de métodos, utiles para realizar diversas
331346
tareas.
332347

@@ -424,24 +439,13 @@
424439
#uncover("4-")[
425440
#v(5em)
426441
#set align(center)
427-
Nada que ustedes no supieran #emoji.face.wink
442+
Nada que ustedes no supieran ya #emoji.face.wink
428443
]
429444

430445
]
431446

432447

433448
#slide[
434-
#let annotation(body) = {
435-
box(
436-
fill: rgb("#dbeafe"),
437-
inset: 8pt,
438-
radius: 4pt,
439-
stroke: rgb("#555")
440-
)[
441-
#set align(center)
442-
#body
443-
]
444-
}
445449

446450
#show raw: it => {
447451
show regex("pin\d+"): it => pin(eval(it.text.slice(3)))
@@ -451,15 +455,17 @@
451455
#v(7em)
452456

453457
#set align(center)
454-
#show raw.where(block: true): set text(size: 26pt) // Code size
458+
#show raw.where(block: true): set text(size: 26pt)
455459
#show raw.where(block: true): it => block(width: 70%, it)
456460

461+
457462
```python
458463
pin1defpin2 pin3funpin4(pin5x, y, zpin6)pin7:pin8
459464
pin9# <cuerpo de la función>pin10
460465
pin11returnpin12 pin13valorpin14
461466
```
462467

468+
463469
#uncover(2)[
464470
#pinit-highlight(1, 2, dy: -1.1em, fill: rgb(0, 0, 255, 50))
465471

@@ -472,7 +478,7 @@
472478
pin-dy: -25pt,
473479
pin-dx: 0pt,
474480
)[
475-
#annotation[
481+
#code-annotation[
476482
Indica comienzo de\
477483
definición de una función
478484
]
@@ -491,7 +497,7 @@
491497
pin-dy: -25pt,
492498
pin-dx: 0pt,
493499
)[
494-
#annotation[
500+
#code-annotation[
495501
Nombre\
496502
de la función
497503
]
@@ -511,7 +517,7 @@
511517
pin-dx: 0pt,
512518
pin-dy: -25pt
513519
)[
514-
#annotation[Argumentos \ de la función]
520+
#code-annotation[Argumentos \ de la función]
515521
]
516522
]
517523

@@ -527,7 +533,7 @@
527533
pin-dx: 0pt,
528534
pin-dy: -25pt
529535
)[
530-
#annotation[Comienza un \ bloque de código]
536+
#code-annotation[Comienza un \ bloque de código]
531537
]
532538
]
533539

@@ -543,7 +549,7 @@
543549
pin-dx: -5pt,
544550
pin-dy: -8pt
545551
)[
546-
#annotation[Código que se ejecuta \ cuando se llama a la función]
552+
#code-annotation[Código que se ejecuta \ cuando se llama a la función]
547553
]
548554
]
549555

@@ -559,7 +565,7 @@
559565
pin-dx: 0pt,
560566
pin-dy: 10pt
561567
)[
562-
#annotation[Indica que se devuelve un valor \ y el fin de la ejecución \
568+
#code-annotation[Indica que se devuelve un valor \ y el fin de la ejecución \
563569
de la función]
564570
]
565571
]
@@ -576,7 +582,7 @@
576582
pin-dx: 0pt,
577583
pin-dy: 10pt
578584
)[
579-
#annotation[Valor que devuelve la función]
585+
#code-annotation[Valor que devuelve la función]
580586
]
581587
]
582588
]
@@ -585,58 +591,103 @@
585591

586592
#new-section-slide[Ejecución condicional]
587593

588-
#slide[
589594

595+
596+
597+
#slide[
590598
#place(center + horizon)[
591-
#scale(90%)[
592-
#diagram(
593-
spacing: (16mm, 12mm),
594-
node-stroke: 2pt,
595-
edge-stroke: 1.1pt,
596-
node-corner-radius: 3pt,
597-
598-
node(
599-
(0,0),
600-
[Inicio],
601-
name: <inicio>,
602-
width: 30mm,
603-
fill: rgb("#c7d9c4"),
604-
stroke: rgb("#7cab69")
605-
),
606-
607-
node(
608-
(0, 2),
609-
[Hay humo?],
610-
name: <h1>,
611-
shape: diamond,
612-
width: 34mm,
613-
height: 24mm,
614-
fill: rgb("#efe4bf"),
615-
stroke: rgb("#d0aa43")
616-
),
617-
618-
node((3,2), align(center)[Querés\ sufrir?], name: <sufrir>, shape: diamond,
619-
width: 34mm, height: 24mm, fill: rgb("#efe4bf"), stroke: rgb("#d0aa43")),
620-
node((6,2), [Esperar un rato], name: <esperar>, width: 40mm,
621-
fill: rgb("#d9d0e2"), stroke: rgb("#8f73a8")),
622-
node((6,5), [Hay humo?], name: <h2>, shape: diamond,
623-
width: 34mm, height: 24mm, fill: rgb("#efe4bf"), stroke: rgb("#d0aa43")),
624-
node((0,5), [Salir afuera], name: <salir>, width: 36mm,
625-
fill: rgb("#d9d0e2"), stroke: rgb("#8f73a8")),
626-
node((0,7), [Fin], name: <fin>, width: 30mm,
627-
fill: rgb("#c7d9c4"), stroke: rgb("#7cab69")),
628-
629-
edge(<inicio.south>, <h1.north>, "-|>"),
630-
edge(<h1.east>, <sufrir.west>, "-|>", [Sí]),
631-
edge(<h1.south>, <salir.north>, "-|>", [No]),
632-
edge(<sufrir.east>, <esperar.west>, "-|>", [No]),
633-
edge(<sufrir.south>, <salir.east>, "-|>", [Sí]),
634-
edge(<esperar.south>, <h2.north>, "-|>"),
635-
edge(<h2.west>, <salir.east>, "-|>", [No]),
636-
edge(<h2.east>, <esperar.east>, "-|>", [Sí], bend: -50deg),
637-
edge(<salir.south>, <fin.north>, "-|>"),
638-
)
639-
]
599+
#fletcher-diagram(
600+
601+
spacing: (12mm, 13mm),
602+
node-stroke: 2pt,
603+
edge-stroke: 1.3pt,
604+
node-corner-radius: 4pt,
605+
606+
node(
607+
(0, 0),
608+
[¿Aprobaste\ el parcial?],
609+
name: <parcial>,
610+
width: 50mm,
611+
height: 25mm,
612+
fill: rgb("#efe4bf"),
613+
stroke: rgb("#d0aa43"),
614+
shape: ellipse,
615+
outset: 5pt,
616+
),
617+
618+
node(
619+
(0, 2.4),
620+
[¿Aprobaste el\ recuperatorio?],
621+
name: <recuperatorio>,
622+
width: 60mm,
623+
height: 25mm,
624+
fill: rgb("#efe4bf"),
625+
stroke: rgb("#d0aa43"),
626+
shape: ellipse,
627+
outset: 5pt,
628+
),
629+
node(
630+
(2.8, 0),
631+
[¿Aprobaste\ el TP?],
632+
name: <tp>,
633+
width: 50mm,
634+
height: 25mm,
635+
fill: rgb("#efe4bf"),
636+
stroke: rgb("#d0aa43"),
637+
shape: ellipse,
638+
outset: 5pt,
639+
),
640+
node(
641+
(4.5, 2),
642+
[¿Promedio\ mayor a 8?],
643+
name: <promedio>,
644+
width: 50mm,
645+
height: 25mm,
646+
fill: rgb("#efe4bf"),
647+
stroke: rgb("#d0aa43"),
648+
shape: ellipse,
649+
outset: 5pt,
650+
),
651+
node(
652+
(0, 4),
653+
[Libre],
654+
name: <libre>,
655+
width: 38mm,
656+
height: 20mm,
657+
fill: rgb("#d9d0e2"),
658+
stroke: rgb("#8f73a8"),
659+
outset: 5pt,
660+
),
661+
node(
662+
(3.5, 4),
663+
[Regular],
664+
name: <regular>,
665+
width: 38mm,
666+
height: 20mm,
667+
fill: rgb("#d9d0e2"),
668+
stroke: rgb("#8f73a8"),
669+
outset: 5pt,
670+
),
671+
node(
672+
(5.5, 4),
673+
[Promovido],
674+
name: <promovido>,
675+
width: 38mm,
676+
height: 20mm,
677+
fill: rgb("#d9d0e2"),
678+
stroke: rgb("#8f73a8"),
679+
outset: 5pt,
680+
),
681+
682+
edge(<parcial.east>, <tp.west>, "-|>", [si]),
683+
edge(<parcial.south>, <recuperatorio.north>, "-|>", [no]),
684+
edge(<recuperatorio.east>, <tp.south-west>, "-|>", [si]),
685+
edge(<recuperatorio.south>, <libre.north>, "-|>", [no]),
686+
edge(<tp.east>, <promedio.north>, "-|>", [si], corner: right),
687+
edge(<tp.south>, <libre.east>, "-|>", [no], bend: 30deg),
688+
edge(<promedio.south>, <regular.north>, "-|>", [no]),
689+
edge(<promedio.south>, <promovido.north>, "-|>", [si]),
690+
)
640691
]
641692

642693
]

slides/demos/example.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
smart-indent: false,
1111
)
1212

13-
#import "../template.typ": setup-template, new-section-slide
13+
#import "../old/template.typ": setup-template, new-section-slide
1414

1515
#show: setup-template.with(
1616
title: [Primera clase: \ Conociendo Python],

0 commit comments

Comments
 (0)