-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest0_v1.py
More file actions
19 lines (15 loc) · 800 Bytes
/
test0_v1.py
File metadata and controls
19 lines (15 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Consegna:
# 1. Creare un sistema che prenda in input un dato e lo stampi dopo aver controllato che non abba valore False
# 2. Creare una serie di input inserirli in una lista e stamparli, controllando che non abbia valori False
# 3. Creare un sistema di domande e input che inseriscano e controllino i dati, se non sono corretti non verranno inseriti nella lista
#1#2#3
#Metodo alternativo:
ListOfAnsware=[]
questions = ["Da dove vieni?", "Quanti anni hai?","Cosa studi?", "Dove", "Perché?"]
ListOfAllowedAnsware=["Napoli", "20", "Matematica", "Bologna", "Mi piace"]
for x in range(len(questions)):
risposta = input(questions[x])
if(risposta and risposta.lower() == ListOfAllowedAnsware[x].lower()):
print(risposta)
ListOfAnsware.append(risposta)
print(ListOfAnsware)