Tags:
tag this topic
create new tag
view all tags
---+++ Esercizio 1 ---++Test 1 *Input* <verbatim> Se lei se io, adesso sei dove sotto quale cielo pensi al tuo domani? ; . , : bla bla bla bla bla bla quale, se io se lei: adesso dove sei sotto quale cielo pensi al tuo domani!!! bla bla bla quale bla bla bla; sotto? se io se lei? adesso dove sei sotto quale cielo pensi al tuo domani;;; bla bla bla bla bla bla! se io se lei, adesso dove sei sotto quale cielo pensi al tuo domani,,, bla bla bla bla bla bla? - </verbatim> *Output* <verbatim> bla 24 se 8 quale 6 sotto 5 lei 4 io 4 adesso 4 sei 4 dove 4 cielo 4 </verbatim> ---+++ Esercizio 2 ---++Test 1 *Input* <verbatim> To be, or not to be,that is the question: Whether tis nobler in the mind to suffer The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them?To die,to sleep, No more; and by a sleep to say we end The heartache, and the thousand natural shocks That flesh is heir to,tis a consummation Devoutly to be wishd. To die,to sleep; To sleep! perchance to dream:ay, theres the rub; To be, or not to be,that is the question: Whether tis nobler in the mind to suffer The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? </verbatim> *Output* <verbatim> np = 50 To be or not that is the question Whether tis nobler in mind suffer slings and arrows of outrageous fortune take arms against a sea troubles by opposing end them die sleep No more say we heartache thousand natural shocks flesh heir consummation Devoutly wishd perchance dream ay theres rub </verbatim> ---++ Test 2 *Input* <verbatim> Jul. Ay me! Jul. O Romeo, Romeo! wherefore art thou Romeo? Deny thy father and refuse thy name! Or, if thou wilt not, be but sworn my love, And I will no longer be a Capulet. Rom. She speaks. O, speak again, bright angel! for thou art As glorious to this night, being over my head, As is a winged messenger of heaven Unto the white upturned wond ring eyes Of mortals that fall back to gaze on him When he bestrides the lazy pacing clouds And sails upon the bosom of the air. Jul. O Romeo, Romeo! wherefore art thou Romeo? Deny thy father and refuse thy name! Or, if thou wilt not, be but sworn my love, And I will no longer be a Capulet. </verbatim> *Output* <verbatim> np = 74 Jul Ay me O Romeo wherefore art thou Deny thy father and refuse name Or if wilt not be but sworn my love I will no longer a Capulet Rom She speaks speak again bright angel for As glorious to this night being over head is winged messenger of heaven Unto the white upturned wond ring eyes mortals that fall back gaze on him When he bestrides lazy pacing clouds sails upon bosom air </verbatim> ---++ Test 3 *Input* <verbatim> Se lei se io, adesso sei dove sotto quale cielo pensi al tuo domani? ; . , : bla bla bla bla bla bla quale, se io se lei: adesso dove sei sotto quale cielo pensi al tuo domani!!! bla bla bla quale bla bla bla; sotto? se io se lei? adesso dove sei sotto quale cielo pensi al tuo domani;;; bla bla bla bla bla bla! se io se lei, adesso dove sei sotto quale cielo pensi al tuo domani,,, bla bla bla bla bla bla? </verbatim> *Output* <verbatim> np = 14 Se lei io adesso sei dove sotto quale cielo pensi al tuo domani bla </verbatim> ---++Test 4 *Input* <verbatim> </verbatim> *Output* <verbatim> np = 0 </verbatim> ---+++ Esercizio 3 Per questo esercizio i test gli ho fatti nel seguente modo: ho chiamato la vostra funzione __terre_distanti__ con 4 matrici diverse in dimensione e/o contenuto. Per ognuna di queste matrici ho testato le distanze da _-1_ a _n_ . ---++Test 1 *Input* <verbatim> 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </verbatim> *Output* <verbatim> parole a distanza -1: 0 parole a distanza 0: 6 parole a distanza 1: 12 parole a distanza 2: 6 parole a distanza 3: 6 parole a distanza 4: 6 parole a distanza 5: 0 parole a distanza 6: 0 </verbatim> ---++ Test 2 *Input* <verbatim> 0 0 0 0 </verbatim> *Output* <verbatim> parole a distanza -1: 0 parole a distanza 0: 4 parole a distanza 1: 0 parole a distanza 2: 0 </verbatim> ---++ Test 3 *Input* <verbatim> 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </verbatim> *Output* <verbatim> parole a distanza -1: 0 parole a distanza 0: 1 parole a distanza 1: 3 parole a distanza 2: 5 parole a distanza 3: 7 parole a distanza 4: 0 </verbatim> ---++ Test 4 *Input* <verbatim> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </verbatim> *Output* <verbatim> parole a distanza -1: 0 parole a distanza 0: 0 parole a distanza 1: 0 parole a distanza 2: 0 parole a distanza 3: 0 parole a distanza 4: 0 parole a distanza 5: 0 </verbatim> -- Users.JulindaStefa - 10 Dec 2007
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2007-12-10
-
JulindaStefa
Log In
or
Register
Programmazione1 Web ...
Programmazione1 Web
Programmazione1 Web Home
Users
Groups
Index
Search
Changes
Notifications
Statistics
Preferences
User Reference ...
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
ChangeEmailAddress
ChangePassword
ResetPassword
Prenotazioni esami
Laurea Triennale ...
Laurea Triennale
Algebra
Algoritmi
Introduzione agli algoritmi
Algoritmi 1
Algoritmi 2
Algoritmi per la
visualizzazione
Architetture
Prog. sist. digitali
Architetture 2
Basi di Dati
Basi di Dati 1 Inf.
Basi di Dati 1 T.I.
Basi di Dati (I modulo, A-L)
Basi di Dati (I modulo, M-Z)
Basi di Dati 2
Calcolo
Calcolo differenziale
Calcolo integrale
Calcolo delle Probabilitą
Metodi mat. per l'inf. (ex. Logica)
canale AD
canale PZ
Programmazione
Fond. di Programmazione
Metodologie di Programmazione
Prog. di sistemi multicore
Programmazione 2
AD
EO
PZ
Esercitazioni Prog. 2
Lab. Prog. AD
Lab. Prog. EO
Lab. Prog. 2
Prog. a Oggetti
Reti
Arch. di internet
Lab. di prog. di rete
Programmazione Web
Reti di elaboratori
Sistemi operativi
Sistemi Operativi (12 CFU)
Anni precedenti
Sistemi operativi 1
Sistemi operativi 2
Lab. SO 1
Lab. SO 2
Altri corsi
Automi, Calcolabilitą
e Complessitą
Apprendimento Automatico
Economia Aziendale
Elaborazione Immagini
Fisica 2
Grafica 3D
Informatica Giuridica
Laboratorio di Sistemi Interattivi
Linguaggi di Programmazione 3° anno Matematica
Linguaggi e Compilatori
Sistemi Informativi
Tecniche di Sicurezza dei Sistemi
ACSAI ...
ACSAI
Computer Architectures 1
Programming
Laurea Magistrale ...
Laurea Magistrale
Percorsi di studio
Corsi
Algoritmi Avanzati
Algoritmica
Algoritmi e Strutture Dati
Algoritmi per le reti
Architetture degli elaboratori 3
Architetture avanzate e parallele
Autonomous Networking
Big Data Computing
Business Intelligence
Calcolo Intensivo
Complessitą
Computer Systems and Programming
Concurrent Systems
Crittografia
Elaborazione del Linguaggio Naturale
Estrazione inf. dal web
Fisica 3
Gamification Lab
Information Systems
Ingegneria degli Algoritmi
Interazione Multi Modale
Metodi Formali per il Software
Methods in Computer Science Education: Analysis
Methods in Computer Science Education: Design
Prestazioni dei Sistemi di Rete
Prog. avanzata
Internet of Things
Sistemi Centrali
Reti Wireless
Sistemi Biometrici
Sistemi Distribuiti
Sistemi Informativi Geografici
Sistemi operativi 3
Tecniche di Sicurezza basate sui Linguaggi
Teoria della
Dimostrazione
Verifica del software
Visione artificiale
Attivitą complementari
Biologia Computazionale
Design and development of embedded systems for the Internet of Things
Lego Lab
Logic Programming
Pietre miliari della scienza
Prog. di processori multicore
Sistemi per l'interazione locale e remota
Laboratorio di Cyber-Security
Verifica e Validazione di Software Embedded
Altri Webs ...
Altri Webs
Dottorandi
Commissioni
Comm. Didattica
Comm. Didattica_r
Comm. Dottorato
Comm. Erasmus
Comm. Finanziamenti
Comm. Scientifica
Comm Scientifica_r
Corsi esterni
Sistemi Operativi (Matematica)
Perl e Bioperl
ECDL
Fondamenti 1
(NETTUNO)
Tecniche della Programmazione 1° modulo
(NETTUNO)
Seminars in Artificial Intelligence and Robotics: Natural Language Processing
Informatica generale
Primo canale
Secondo canale
II canale A.A. 10-11
Informatica
Informatica per Statistica
Laboratorio di Strumentazione Elettronica e Informatica
Progetti
Nemo
Quis
Remus
TWiki ...
TWiki
Tutto su TWiki
Users
Main
Sandbox
Home
Site map
AA web
AAP web
ACSAI web
AA2021 web
Programming web
AA2021 web
AN web
ASD web
Algebra web
AL web
AA1112 web
AA1213 web
AA1920 web
AA2021 web
MZ web
AA1112 web
AA1213 web
AA1112 web
AA1314 web
AA1415 web
AA1516 web
AA1617 web
AA1819 web
Old web
Algo_par_dis web
Algoreti web
More...
Programmazione1 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Questo sito usa cookies, usandolo ne accettate la presenza. (
CookiePolicy
)
Torna al
Dipartimento di Informatica
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback