Oct-13-2018, 07:59 AM
SO guys. I made this program(I think nice... :D):
now, I woant clean every time I enter piolta's name.
A more professional way to scroll the lines.
Thank you advance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
bottas = [ 77 , "28/08/1989" , "Finlandia" , "Australia 2013" , 98 , 3 , 4 , 0 ] hamilton = [ 44 , "07/01/1985" , "Inghilterra" , "Australia 2007" , 208 , 62 , 74 , "4(2008-2014-2015-2017)" ] raikkonen = [ 7 , "17/10/1979" , "Finlandia" , "Australia 2001" , 273 , 20 , 17 , "1(2007)" ] vettel = [ 5 , "03/07/1987" , "Germania" , "Stati Uniti 2007" , 198 , 47 , 50 , "4(2010-2011-2012-2013)" ] verstappen = [ 38 , "30/07/1997" , "Belgio" , "Australia 2015" , 60 , 3 , 0 , 0 ] ricciardo = [ 3 , "01/07/1989" , "Australia" , "Gran Bretagna 2011" , 129 , 5 , 1 , 0 ] alonso = [ 14 , "29/07/1981" , "Spagna" , "Australia 2001" , 293 , 32 , 22 , "2(2005-2006)" ] def pilota(dato): indice = 0 print ( " " * 25 , "*" * 50 ) while indice< 8 : etichetta = [ "Numero di gara:" , "Data di nascita:" , "nazione:" , "Esordio:" , "Presenze:" , "Vittorie:" , "Pole position:" , "Titoli iridati:" ] print ( " " * 30 , "*" ,etichetta[indice],dato[indice]) indice + = 1 print ( " " * 25 , "*" * 50 ) print ( "PILOTI FORMULA 1 2018" ) print ( "Schede dei piloti del campionato mondiale di Formula 1\n" ) name = "null" while name = = "null" : name = input ( "Nome del pilota del quale vuoi le statistiche: " ) name = name.lower() if name = = "bottas" : pilota(bottas) name = "null" elif name = = "hamilton" : pilota(hamilton) name = "null" elif name = = "raikkonen" : pilota(raikkonen) name = "null" elif name = = "vettel" : pilota(vettel) name = "null" elif name = = "verstappen" : pilota(verstappen) name = "null" elif name = = "ricciardo" : pilota(ricciardo) name = "null" elif name = = "alonso" : pilota(alonso) name = "null" elif name = = "quit" : print ( "E' stato un piacere. A presto!" ) print ( "++++++++++++++++++++FINISH++++++++++++++++++++" ) |
A more professional way to scroll the lines.
Thank you advance