

Strutture iterative - ciclo for
Presentation
•
Computers
•
KG
•
Practice Problem
•
Medium
germana grassi
Used 8+ times
FREE Resource
10 Slides • 3 Questions
1
Strutture iterative
Ciclo FOR
2
Problema:
Scrivere i numeri interi da 0 a 1000
0
1
2
..
1000
3
Cosa succede ?
Struttura sequenziale
4
Lunghissimo!!!!!
Struttura sequenziale
5
È corretto, ma dal punto di vista formale non è strutturato
Molte istruzioni sono ripetute !!!
Struttura sequenziale
6
Sono necessarie strutture sintattiche specifiche per far eseguire più volte un blocco di istruzioni (detto corpo del ciclo)
Struttura iterativa
7
Multiple Choice
Quando posso utilizzare un struttura iterativa?
sempre
quando c'è numero finito di istruzioni
quando c'è un blocco di istruzioni ripetute
mai
8
Per il nostro problema il corpo del ciclo è "Scrivi i" che viene ripetuto 1000 volte
Struttura iterativa
for (i=0; i<=1000; i++)
scrivi(i);
i è detto indice
9
Cosa succede?
Struttura iterativa
10
CONFRONTO
SEQUENZIALE VS ITERATIVA
Struttura iterativa
11
Multiple Choice
Un problema risolto tramite una struttura iterativa, avrà un numero di istruzioni scritte .....
maggiore rispetto alla soluzione sequenziale
minore rispetto alla soluzione sequenziale
12
Multiple Choice
i è ...
pollice
indice
mignolo
brontolo
13
Si sveglia
Fa colazione
Va a scuola
Torna da scuola
Pranza
Studia
Cena
Va a letto
Supponiamo che uno studente si reca all’estero 30 giorni, per seguire un corso in una scuola. Questa potrebbe essere la sua routine giornaliera:
Problema ->
risolvi con flowgorithm
Strutture iterative
Ciclo FOR
Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
10 questions
Easter eggs e Doodles
Presentation
•
9th - 12th Grade
9 questions
Cellule, virus e batteri
Presentation
•
6th - 8th Grade
11 questions
LE FORZE: INTRODUZIONE
Presentation
•
9th - 12th Grade
10 questions
il nome
Presentation
•
1st Grade
10 questions
GLI ANIMALI
Presentation
•
1st - 5th Grade
10 questions
Gravitazione Universale
Presentation
•
9th Grade
10 questions
Oceania
Presentation
•
6th - 8th Grade
9 questions
La seconda guerra mondiale
Presentation
•
6th - 8th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade