Atividades da primeira aula

Algoritmos (parte 1)



Acessem o link:

https://code.org/

Vejam o vídeo introdutório:




Agora você é convidado a ajudar personagens famosos do mundo dos games e dos desenhos, como o 'Angry Bird' e o esquilo da 'Era do Gelo', a completarem alguns quebra-cabeças na forma de labirintos.

Siga as instruções e complete as 20 atividades:

https://studio.code.org/hoc/1

Ao final, você terá conquistado seu primeiro badge (certificado)!!


Algoritmos (parte 2)


 Experiências com LOGO:

A linguagem LOGO, também conhecida como a linguagem da tartaruguinha, foi criada há cerca de 55 anos com o objetivo de ensinar crianças a programar.

A ideia é dar comandos simples a uma tartaruga, que carrega em seu casco uma caneta: ande tantos passos, gire à direita ou à esquerda tantos graus, levante a caneta, abaixe a caneta, repita tantas vezes algo, etc.

Acessem o link e testem os seguintes códigos: 


-Desenhando um quadrado:
repeat 4 [ fd 100 rt 90 ] 

-Desenhando um triângulo:
repeat 3 [ fd 100  rt 120 ]

-Desenhando um círculo:
repeat 360 [ fd 2 rt 1 ]

-Desenhando uma flor:
repeat 12 [
repeat 360 [ fd 2 rt 1 ]
rt 30
]

-Desenhando uma estrela:
rt 18
repeat 5 [ fd 300 rt 144]

-Desenhando outra flor:
repeat 100 [setcolor pick [ red orange yellow green blue violet ]    rt 20 repeat 360 [ fd 2 rt 1 ]]

Desenhos variados feitos por alunos:
-Girassol
repeat 360 [rt 18 repeat 5 [ fd 50 rt 144]]

-Outra flor:
repeat 360 [fd 200 rt 100]

-Casinha
repeat 4 [fd 100 rt 90]
fd 100 rt 45
fd 70 rt 90 fd 70
rt 45 fd 100
rt 90 fd 50 rt 90 fd 30 rt 90 fd 30 rt 90 fd 30

-Bandeira da França:
repeat 50[
   setcolor pick [red]
fd 200
rt 90
fd 1
rt 90
fd 200
rt -90
fd 1
rt -90
]
repeat 50[
   setcolor pick [white]
fd 200
rt 90
fd 1
rt 90
fd 200
rt -90
fd 1
rt -90
]
repeat 50[
   setcolor pick [blue]
fd 200
rt 90
fd 1
rt 90
fd 200
rt -90
fd 1
rt -90
]
repeat 5[
   setcolor pick [black]
fd 200
rt 90
fd 1
rt 90
fd 400
rt -90
fd 1
rt -90
   fd 200
]

-Coração:
pendown
setcolor pick [red]
rt 30
fd 150
rt 180
fd 150
rt 95
fd 150
repeat 180 [rt 1 fd 1.2]
rt -90
repeat 180 [rt 1 fd 1.2]
penup
fd 300

-Cubo
repeat 4 [fd 150 rt 90]
fd 110
rt -90 fd 100
rt -90 fd 150
rt 90 fd -150
rt 90 fd 150
rt -90 fd 50
fd 100
rt 158 fd 109
rt 112 fd 40
rt -90 fd 50
rt -21 fd 105
rt 111 fd 149
rt 90 fd 150
rt -22 fd 108
rt -158 fd 150
rt -21 fd 110

-Outro cubo: 
setcolor pick [blue]
repeat 4 [fd 100 rt 90]
rt 60 fd 100
rt -60
rt 90 fd 100
rt 150 fd 100
rt 180 fd 100
rt -60
rt -90 fd 100
rt 90
repeat 4 [fd 100 rt 90]
fd 100 rt -120 
fd 100
rt -150 fd 100
rt -30 fd 100

-Homem
fd 50 rt 270
repeat 60 [fd 5  rt 6] 
rt 630 fd 100 rt 45 fd 40 
rt 180 fd 40 rt 450 fd 40 
rt 180 fd 40 rt 45 fd 100 
rt 135 fd 40 rt 180 fd 40 
rt 270 fd 40 rt 180 fd 40

-Quebra-cabeça
fd 30 rt 90 fd 30
rt -90 repeat 60 [fd 1 rt 3]
rt -90 fd 30 rt 90 fd 30
rt 90 repeat 60 [fd 1 rt -3]
rt 90 fd 30 rt 90 fd 30
rt 90 repeat 60 [fd 1 rt -3]
rt 90 fd 30 rt 90
fd 30 rt -90
repeat 60 [fd 1 rt 3]

-Cubo 3:
repeat 8 [repeat 4 [rt 90 fd 100] bk 100 lt 45] 

-Mais outra flor:
setcolor pick [green]
 bk 100
 fd 200
 setcolor pick [orange]
 repeat 200 [ fd 100 rt 100 ]

- Flor multicolorida:
 repeat 100 [setcolor pick [ red orange yellow green blue violet ]    rt 20 repeat 360 [ fd 2 rt 1 ]]

-Bandeira do Brasil:
setcolor pick [blue]
repeat 360 [repeat 360 [fd 1 rt 1] rt 1]
fd 115
setcolor pick [white]
fd 40
setcolor pick [yellow]
rt 120 fd 340
rt 120 fd 340
rt 60 fd 340
rt 120 fd 340
left 60
setcolor pick [white]
fd 50 rt 90
setcolor pick [green]
repeat 2 [fd 450 rt 90]
fd 900 rt 90
repeat 2 [fd 450 rt 90]

-Flor/mandala:
setcolor pick [yellow]
repeat 360 [rt 100 repeat 5 [ fd 100 rt 144]]
setcolor pick [red]
repeat 360 [rt 100 repeat 5 [ fd 200 rt 144]]
setcolor pick [blue]
repeat 360 [rt 100 repeat 5 [ fd 300 rt 144]]

-Flor:
lt 90
setcolor pick [#fff]
fd 500
rt 90
fd 175
setcolor pick [#f00]
repeat 9 [
repeat 10 [ fd 25 rt 10 ]
lt 60
]
setcolor pick [ #fff ]
rt 90
fd 110
lt 53
setcolor pick [ #ff0 ]
repeat 360 [ fd 8 rt 2 ]

-Desenho Psicodélico 
repeat 56[
  repeat 360 [ fd 2 rt 1]
  rt 32
]

-Alvo:
fd 30 pu fd 30 pd fd 30 rt 90
fd 30 pu fd 30 pd fd 30 rt 90
fd 30 pu fd 30 pd fd 30 rt 90

-Colmeia:
clearscreen
setcolor pick [orange]
repeat 5 [
repeat 20 [
repeat 6 [fd 10 rt 60] rt -60 fd -10 rt -60 fd -10 rt 120
]
penup
lt 90 fd 355 rt 90 fd -16
pendown
]

-Flor de origami:
repeat 8 [setcolor pick [green red blue violet] lt 45 fd 150 repeat 3 [rt 90 fd 150]]

-Negócio muito doido:
clearscreen
repeat 1000000 [
  setcolor pick [ #fff #ff00ff #000ff #fff123 #fa45ff #123 #102 ]
  repeat 6 [ fd 100 rt 60 ]
  repeat 6 [ fd 100 lt 60 ]
  lt 60
  setcolor pick [ #fff #f12 #ddd #dfa #fa45ff #123 #102 ]
  repeat 6 [ fd 100 rt 60 ]
  repeat 6 [ fd 100 lt 60 ]
  rt 120
  setcolor pick [ #fff #f12 #ddd #dfa #fa45ff #123 #102 ]
  repeat 6 [ fd 100 rt 60 ]
  repeat 6 [ fd 100 lt 60 ]
  rt 60
  setcolor pick [ #fff #f12 #ddd #dfa #fa45ff #123 #102 ]
  repeat 6 [ fd 100 rt 60 ]
  repeat 6 [ fd 100 lt 60 ]  
]

-Flor:
clearscreen
setcolor pick [red]
Repeat 20 [repeat 250 [ fd 1 rt 1 ]Rt 270]

-Estrela de 4 pontas:
repeat 3 [fd 200 back 200 rt 90]
fd 200
back 200
rt 45
fd 50
rt 180
fd 100
rt 180
fd 50
rt 90
fd 50
rt 180
fd 100
rt 57
fd 175
rt 157
fd 175
lt 67
fd 175
rt 157
fd 175 
lt 67 
fd 175
rt 157
fd 175
lt 67
fd 175
rt 157
fd 175

-Olhar penetrante:
cs
repeat 360 [fd 1 rt 1]
rt 90
fd 115
rt 90
fd 10
rt 90
fd 115
rt 90
fd 10
vrt 90
fd 55
repeat 4 [fd 10 rt 90]cs
repeat 360 [fd 1 rt 1]
rt 90
fd 115
rt 90
fd 10
rt 90
fd 115
rt 90
fd 10
rt 90
fd 55
repeat 4 [fd 10 rt 90]

-Mandala:
repeat 50 [
  fd 110
  setcolor pick [red]
 repeat 100 [ fd 50 rt 50]
rt 90
repeat 360 [rt 18 repeat 5 [ fd 50 rt 144]]
]
setcolor pick [white]
rt 90 fd 100
setcolor pick [black]
repeat 360 [rt 18 repeat 5 [ fd 50 rt 144]]

-Foguete:
repeat 4 [ fd 50 rt 40 ]
rt 90
repeat 4 [ fd 50 rt 40 ]
rt 90
repeat 4 [ fd 50 rt 40 ]
rt 90
repeat 4 [ fd 50 rt 40 ]

-Estrela de 4 pontas:
repeat 4 [fd 200 bk 200 rt 90]
repeat 8 [ rt 45 fd 100 bk 100]
rt 45 fd 100
lt 74  fd 146
lt 122 fd 146
rt 32 fd 146
lt 122 fd 146
rt 32 fd 146
lt 122 fd 146
rt 32 fd 146
lt 122 fd 146
lt 74 fd 100
rt 134

- Mickey Mouse
cs
setcolor pick [black]
repeat 180 [fd 2 rt 1]
setcolor pick [red]
repeat 180 [fd 2 rt 1]
setcolor pick [black]
repeat 45  [fd 2 rt 1]
lt 180
repeat 360 [fd 1 rt 1]
lt 180
repeat 90  [fd 2 rt 1]
rt 180
repeat 360 [fd 1 rt 1]
rt 180
repeat 45 [fd 2 rt 1]
rt 90
setcolor pick [red]
fd 230
rt 180
penup
fd 60
rt 90
pendown
setcolor pick [yellow]
penup
fd 70
pendown
rt 90
repeat 360 [fd 0.5 rt 1]
rt 180
penup
fd 110
pendown
rt 180
repeat 360 [fd 0.5 rt 1]
penup
fd 250
pendown

-Bandeira
cs
setcolor pick [blue]
repeat 30 [
fd 100
rt 90
fd 1
rt 90
fd 100
lt 90
fd 1
lt 90
]
setcolor pick [green]
repeat 30 [
fd 100
rt 90
fd 1
rt 90
fd 100
lt 90
fd 1
lt 90
]
setcolor pick [red]
repeat 30 [
fd 100
rt 90
fd 1
rt 90
fd 100
lt 90
fd 1
lt 90
]

-Outra casa
cs
setcolor pick [black]
repeat 4 [fd 100 rt 90]
fd 100
rt 45
repeat 3 [fd 41.5 rt 45]
fd 100
rt 90
fd 75
rt 90
fd 40
rt 90
fd 20
rt 90
fd 40
rt 270
fd 15
rt -90
penup
fd 15
pendown
repeat 4 [fd 25 rt 90]
rt -90
penup
fd 20
pendown
repeat 10 [fd 1 rt 50]
hideturtle

-Bandeira da Inglaterra 
setcolor pick [black]
fd 100 rt 90
fd 150 rt 90
setcolor pick [red]
fd 100 rt 90
fd 150 rt 90
setcolor pick [black]
fd 100 rt 90
fd 150 
setcolor pick [red]
fd 20
setcolor pick [black]
fd 150 rt 90
fd 100 rt 90
setcolor pick [red]
fd 150 rt 90
fd 100 rt 90
setcolor pick [black]
fd 150 rt 90
fd 100
setcolor pick [red]
fd 20
setcolor pick [black]
fd 100 rt 90
fd 150 rt 90
setcolor pick [red]
fd 100 rt 90
fd 150 rt 90
setcolor pick [black]
fd 100 rt 90
fd 150
setcolor pick [red]
fd 20
setcolor pick [black]
fd 150 rt 90
fd 100 rt 90
setcolor pick [red]
fd 150 rt 90
fd 100 rt 90
setcolor pick [black]
fd 150 rt 90
fd 100
setcolor pick [red]
fd 20

-Pokebola
cs
repeat 360 [fd 1 rt 1]
rt 90
fd 115
rt 90
fd 10
rt 90
fd 115
rt 90
fd 10
rt 90
fd 55
repeat 4 [fd 10 rt 90]

-VRUMVRUM COLORIDÃO 3d
cs
repeat 30 [
  setcolor pick [red orange yellow green blue violet black]
repeat 5 [fd 100 lt 90]
rt 90 rt 150
fd 115 lt 150 rt 90 rt 180 fd 65
penup fd 91 pendown
repeat 6 [fd 100 rt 90]
lt 90 lt 150
fd 115 lt 120 fd 65
penup lt 180 fd 65 pendown
fd 85 lt 90 fd 100 lt 90 fd 65
penup fd 90 rt 90 fd 1 pendown
repeat 360 [ fd 1 rt 1 ]
rt 90 fd 90 rt 180
penup fd 90 pendown
fd 190
penup fd 90 rt 90 fd 1 pendown
repeat 360 [ fd 1 rt 1 ]
rt 90 fd 90 rt 180
penup fd 90 pendown
fd 65 lt 90 fd 102
lt 90 fd 105
penup fd 53 pendown rt 90
]

Comentários

Postagens mais visitadas deste blog

Vídeos do Youtube sobre Ciência de Dados