Skip to content

descrizione interessante#227

Closed
Kristoferz wants to merge 4 commits into
UNICT-Quality-Development:mainfrom
Kristoferz:main-kri
Closed

descrizione interessante#227
Kristoferz wants to merge 4 commits into
UNICT-Quality-Development:mainfrom
Kristoferz:main-kri

Conversation

@Kristoferz

Copy link
Copy Markdown

No description provided.

Comment thread src/ex2.py
Comment on lines +54 to +57
while True:
week_input = int(input("inserire giorno: "))
if week_input>=0 and week_input<=7:
break

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosa succede se l'utente inserisce 7?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah si, devo togliere l'uguale in "week_input<=7" sennò accedo a memoria all'esterno dell'array

Comment thread src/ex3.py
Comment on lines +31 to +53
good = False
textInput = input("Enter a famous name+surname, ex. BarackObama ")
if textInput == "BarackObama":
print("44th president of the United States")
good = True
if textInput == "SandroPertini":
print("Former President of the Italian Republic")
good = True
if textInput == "NelsonMandela":
print("Former President of South Africa")
good = True
if textInput == "MahatmaGandhi":
print("Bapu")
good = True
if textInput == "DonaldKnuth":
print("Creator of LaTeX")
good = True
if textInput == "DennisRitchie":
print("Creator of C")
good = True

if good == False:
print("Invalid input! Please enter a good name!") No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invece che usare una variabile ausiliaria potresti semplicemente concatenare degli elif e far ricadere la casistica non valida nell'else finale

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

si, in effetti non ci ho pensato

@Giuseppe-Tornello

Copy link
Copy Markdown
Contributor

in teoria per ogni esercizio sarebbe opportuno creare una PR diversa
Questo implica la creazione di una branch nuova branch per ogni file modificato

@Kristoferz Kristoferz closed this by deleting the head repository Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants