feat: Initial commit

This commit is contained in:
2024-03-22 17:01:42 +01:00
parent 954985f39a
commit c343ff6e93
106 changed files with 143428 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
sesso
droga
C++

27
Laboratorio11/censore.py Normal file
View File

@@ -0,0 +1,27 @@
def readBadWords(filename: str):
fio = open(filename, "r")
bad_words = set()
for line in fio:
bad_words.add(line.strip())
fio.close()
return bad_words
def main():
bad_words = readBadWords("bad_words.txt")
fio = open("input.txt", "r")
fout = open("output.txt", "w")
for line in fio:
for wrd in bad_words:
line = line.replace(wrd, "*"*len(wrd))
fout.write(line)
fio.close()
fout.close()
main()

View File

@@ -0,0 +1,32 @@
from string import printable
def main():
a = list(input("Prima stringa: "))
b = list(input("Seconda stringa: "))
both = set()
ina = set()
inb = set()
nowhere = set()
for char in printable:
ia = char in a
iab = char in b
if ia and iab:
both.add(char)
elif ia:
ina.add(char)
elif iab:
inb.add(char)
else:
nowhere.add(char)
print(both)
print(ina)
print(inb)
print(nowhere)
main()

View File

@@ -0,0 +1,40 @@
def clean(word: str):
a = len(word)
while True:
word = word.strip("()[]{}!?.,<>:;-_`")
if a == len(word):
break
a = len(word)
return word
def main():
filename = input("Inserisci il nome del file: ")
fio = open(filename, "r")
words = {}
for line in fio:
for word in line.split():
word = clean(word)
if word not in words:
words[word] = 1
else:
words[word] += 1
fio.close()
vals = sorted(words.values(), reverse=True)
for i in range(0, 100):
for word in words:
if words[word] == vals[i]:
print(word, end=" ")
words.pop(word)
break
print()
main()

229
Laboratorio11/export.csv Normal file
View File

@@ -0,0 +1,229 @@
name,slug,value,date_of_information,ranking,region
"Liechtenstein","liechtenstein","$139,100","2009 est.","1","Europe"
"Monaco","monaco","$115,700","2015 est.","2","Europe"
"Luxembourg","luxembourg","$110,300","2020 est.","3","Europe"
"Singapore","singapore","$93,400","2020 est.","4","East Asia/Southeast Asia"
"Ireland","ireland","$89,700","2020 est.","5","Europe"
"Qatar","qatar","$85,300","2020 est.","6","Middle East"
"Isle of Man","isle-of-man","$84,600","2014 est.","7","Europe"
"Bermuda","bermuda","$81,800","2019 est.","8","North America"
"Cayman Islands","cayman-islands","$73,600","2019 est.","9","Central America"
"Falkland Islands (Islas Malvinas)","falkland-islands-islas-malvinas","$70,800","2015 est.","10","South America"
"Switzerland","switzerland","$68,400","2020 est.","11","Europe"
"United Arab Emirates","united-arab-emirates","$67,100","2019 est.","12","Middle East"
"Norway","norway","$63,600","2020 est.","13","Europe"
"Brunei","brunei","$62,200","2020 est.","14","East Asia/Southeast Asia"
"Gibraltar","gibraltar","$61,700","2014 est.","15","Europe"
"San Marino","san-marino","$60,800","2019 est.","16","Europe"
"United States","united-states","$60,200","2020 est.","17","North America"
"Jersey","jersey","$56,600","2016 est.","18","Europe"
"Hong Kong","hong-kong","$56,200","2020 est.","19","East Asia/Southeast Asia"
"Denmark","denmark","$55,900","2020 est.","20","Europe"
"Macau","macau","$54,800","2020 est.","21","East Asia/Southeast Asia"
"Netherlands","netherlands","$54,200","2020 est.","22","Europe"
"Guernsey","guernsey","$52,500","2014 est.","23","Europe"
"Iceland","iceland","$52,300","2020 est.","24","Europe"
"Austria","austria","$51,900","2020 est.","25","Europe"
"Germany","germany","$50,900","2020 est.","26","Europe"
"Sweden","sweden","$50,700","2020 est.","27","Europe"
"Andorra","andorra","$49,900","2015 est.","28","Europe"
"Kuwait","kuwait","$49,900","2019 est.","29","Middle East"
"Australia","australia","$48,700","2020 est.","30","Australia - Oceania"
"Belgium","belgium","$48,200","2020 est.","31","Europe"
"Finland","finland","$47,300","2020 est.","32","Europe"
"Saint Pierre and Miquelon","saint-pierre-and-miquelon-2","$46,200","2006 est.","33","North America"
"Canada","canada","$45,900","2020 est.","34","North America"
"Saudi Arabia","saudi-arabia","$44,300","2020 est.","35","Middle East"
"New Zealand","new-zealand","$42,400","2020 est.","36","Australia - Oceania"
"Korea, South","korea-south","$42,300","2020 est.","37","East Asia/Southeast Asia"
"France","france","$42,000","2020 est.","38","Europe"
"Greenland","greenland","$41,800","2015 est.","39","North America"
"United Kingdom","united-kingdom","$41,600","2020 est.","40","Europe"
"Japan","japan","$41,400","2019 est.","41","East Asia/Southeast Asia"
"Bahrain","bahrain","$40,900","2020 est.","42","Middle East"
"Faroe Islands","faroe-islands","$40,000","2014 est.","43","Europe"
"Malta","malta","$39,200","2020 est.","44","Europe"
"Italy","italy","$39,000","2020 est.","45","Europe"
"Czechia","czechia","$38,300","2020 est.","46","Europe"
"Israel","israel","$38,300","2020 est.","47","Middle East"
"Cyprus","cyprus","$37,700","2020 est.","48","Europe"
"Aruba","aruba","$37,500","2017 est.","49","Central America"
"Virgin Islands","virgin-islands","$37,000","2016 est.","50","Central America"
"Lithuania","lithuania","$36,700","2020 est.","51","Europe"
"Slovenia","slovenia","$36,500","2020 est.","52","Europe"
"Spain","spain","$36,200","2020 est.","53","Europe"
"Estonia","estonia","$35,600","2020 est.","54","Europe"
"Guam","guam","$35,600","2016 est.","55","Australia - Oceania"
"Sint Maarten","sint-maarten","$35,300","2018 est.","56","Central America"
"British Virgin Islands","british-virgin-islands","$34,200","2017 est.","57","Central America"
"Montserrat","montserrat","$34,000","2011 est.","58","Central America"
"Puerto Rico","puerto-rico","$33,400","2020 est.","59","Central America"
"Poland","poland","$32,200","2020 est.","60","Europe"
"Portugal","portugal","$32,200","2020 est.","61","Europe"
"New Caledonia","new-caledonia","$31,100","2015 est.","62","Australia - Oceania"
"Hungary","hungary","$31,000","2020 est.","63","Europe"
"Bahamas, The","bahamas-the","$30,800","2020 est.","64","Central America"
"Slovakia","slovakia","$30,300","2020 est.","65","Europe"
"Latvia","latvia","$29,900","2020 est.","66","Europe"
"Romania","romania","$28,800","2020 est.","67","Europe"
"Turkey","turkey","$28,400","2020 est.","68","Middle East"
"Greece","greece","$27,300","2020 est.","69","Europe"
"Oman","oman","$27,300","2019 est.","70","Middle East"
"Croatia","croatia","$26,500","2020 est.","71","Europe"
"Russia","russia","$26,500","2020 est.","72","Central Asia"
"Malaysia","malaysia","$26,400","2020 est.","73","East Asia/Southeast Asia"
"Panama","panama","$25,400","2020 est.","74","Central America"
"Kazakhstan","kazakhstan","$25,300","2020 est.","75","Central Asia"
"Taiwan","taiwan","$24,502","2018 est.","76","East Asia/Southeast Asia"
"Curacao","curacao","$24,500","2019 est.","77","Central America"
"Northern Mariana Islands","northern-mariana-islands","$24,500","2016 est.","78","Australia - Oceania"
"Seychelles","seychelles","$24,400","2020 est.","79","Africa"
"Trinidad and Tobago","trinidad-and-tobago","$23,700","2020 est.","80","Central America"
"Chile","chile","$23,300","2020 est.","81","South America"
"Saint Kitts and Nevis","saint-kitts-and-nevis","$23,300","2020 est.","82","Central America"
"Bulgaria","bulgaria","$22,400","2020 est.","83","Europe"
"Uruguay","uruguay","$21,600","2020 est.","84","South America"
"Turks and Caicos Islands","turks-and-caicos-islands","$21,100","2020 est.","85","Central America"
"Argentina","argentina","$19,700","2020 est.","86","South America"
"Costa Rica","costa-rica","$19,700","2020 est.","87","Central America"
"Mauritius","mauritius","$19,500","2020 est.","88","Africa"
"Saint Martin","saint-martin","$19,300","2005 est.","89","Central America"
"Belarus","belarus","$19,100","2020 est.","90","Europe"
"Guyana","guyana","$18,700","2020 est.","91","South America"
"Montenegro","montenegro","$18,300","2020 est.","92","Europe"
"Serbia","serbia","$18,200","2020 est.","93","Europe"
"Antigua and Barbuda","antigua-and-barbuda","$18,000","2020 est.","94","Central America"
"Mexico","mexico","$17,900","2020 est.","95","North America"
"Palau","palau","$17,600","2019 est.","96","Australia - Oceania"
"Thailand","thailand","$17,300","2020 est.","97","East Asia/Southeast Asia"
"Dominican Republic","dominican-republic","$17,000","2020 est.","98","Central America"
"Equatorial Guinea","equatorial-guinea","$17,000","2020 est.","99","Africa"
"French Polynesia","french-polynesia","$17,000","2015 est.","100","Australia - Oceania"
"Cook Islands","cook-islands","$16,700","2016 est.","101","Australia - Oceania"
"China","china","$16,400","2020 est.","102","East Asia/Southeast Asia"
"Suriname","suriname","$16,100","2020 est.","103","South America"
"Botswana","botswana","$16,000","2020 est.","104","Africa"
"Turkmenistan","turkmenistan","$15,500","2019 est.","106","Central Asia"
"Grenada","grenada","$15,100","2020 est.","107","Central America"
"Gabon","gabon","$14,400","2020 est.","108","Africa"
"Bosnia and Herzegovina","bosnia-and-herzegovina","$14,300","2020 est.","109","Europe"
"Brazil","brazil","$14,100","2020 est.","110","South America"
"Georgia","georgia","$14,100","2020 est.","111","Middle East"
"Azerbaijan","azerbaijan","$13,700","2020 est.","112","Middle East"
"Nauru","nauru","$13,500","2019 est.","113","Australia - Oceania"
"Colombia","colombia","$13,400","2020 est.","114","South America"
"Albania","albania","$13,300","2020 est.","115","Europe"
"Maldives","maldives","$13,000","2020 est.","116","South Asia"
"Barbados","barbados","$12,900","2020 est.","117","Central America"
"Armenia","armenia","$12,600","2020 est.","118","Middle East"
"Sri Lanka","sri-lanka","$12,500","2020 est.","119","South Asia"
"Iran","iran","$12,400","2020 est.","120","Middle East"
"Ukraine","ukraine","$12,400","2020 est.","121","Europe"
"Cuba","cuba","$12,300","2016 est.","122","Central America"
"Moldova","moldova","$12,300","2020 est.","123","Europe"
"Paraguay","paraguay","$12,300","2020 est.","124","South America"
"Saint Lucia","saint-lucia","$12,300","2020 est.","125","Central America"
"Anguilla","anguilla","$12,200","2008 est.","126","Central America"
"Saint Vincent and the Grenadines","saint-vincent-and-the-grenadines","$12,100","2020 est.","127","Central America"
"Egypt","egypt","$12,000","2020 est.","128","Africa"
"Lebanon","lebanon","$11,600","2020 est.","129","Middle East"
"Mongolia","mongolia","$11,500","2020 est.","130","East Asia/Southeast Asia"
"South Africa","south-africa","$11,500","2020 est.","131","Africa"
"Indonesia","indonesia","$11,400","2020 est.","132","East Asia/Southeast Asia"
"Peru","peru","$11,300","2020 est.","133","South America"
"American Samoa","american-samoa","$11,200","2016 est.","134","Australia - Oceania"
"Fiji","fiji","$11,000","2020 est.","135","Australia - Oceania"
"Bhutan","bhutan","$10,900","2020 est.","136","South Asia"
"Kosovo","kosovo","$10,800","2020 est.","137","Europe"
"Algeria","algeria","$10,700","2020 est.","138","Africa"
"Ecuador","ecuador","$10,300","2020 est.","139","South America"
"Libya","libya","$10,300","2020 est.","140","Africa"
"Dominica","dominica","$9,900","2020 est.","141","Central America"
"Jordan","jordan","$9,800","2020 est.","142","Middle East"
"Tunisia","tunisia","$9,700","2020 est.","143","Africa"
"Iraq","iraq","$9,300","2020 est.","144","Middle East"
"Namibia","namibia","$8,900","2020 est.","145","Africa"
"Jamaica","jamaica","$8,700","2020 est.","146","Central America"
"Eswatini","eswatini","$8,400","2020 est.","147","Africa"
"Guatemala","guatemala","$8,400","2020 est.","148","Central America"
"Vietnam","vietnam","$8,200","2020 est.","149","East Asia/Southeast Asia"
"El Salvador","el-salvador","$8,100","2020 est.","150","Central America"
"Philippines","philippines","$8,000","2020 est.","151","East Asia/Southeast Asia"
"Bolivia","bolivia","$7,900","2020 est.","152","South America"
"Laos","laos","$7,800","2020 est.","153","East Asia/Southeast Asia"
"Saint Helena, Ascension, and Tristan da Cunha","saint-helena-ascension-and-tristan-da-cunha","$7,800","FY09/10 est.","154","Africa"
"Venezuela","venezuela","$7,704","2018 est.","155","South America"
"Uzbekistan","uzbekistan","$7,000","2020 est.","156","Central Asia"
"Morocco","morocco","$6,900","2020 est.","157","Africa"
"Tonga","tonga","$6,400","2019 est.","158","Australia - Oceania"
"Samoa","samoa","$6,300","2020 est.","159","Australia - Oceania"
"Gaza Strip","gaza-strip","$6,220","2019 est.","160","Middle East"
"Angola","angola","$6,200","2020 est.","161","Africa"
"Belize","belize","$6,100","2020 est.","162","Central America"
"India","india","$6,100","2020 est.","163","South Asia"
"Tokelau","tokelau","$6,004","2017 est.","164","Australia - Oceania"
"Cabo Verde","cabo-verde","$6,000","2020 est.","165","Africa"
"Niue","niue","$5,800","2003 est.","166","Australia - Oceania"
"Djibouti","djibouti","$5,500","2020 est.","167","Africa"
"West Bank","west-bank","$5,400","2020 est.","168","Middle East"
"Ghana","ghana","$5,300","2020 est.","169","Africa"
"Nicaragua","nicaragua","$5,300","2020 est.","170","Central America"
"Cote d'Ivoire","cote-divoire","$5,200","2020 est.","171","Africa"
"Honduras","honduras","$5,100","2020 est.","172","Central America"
"Mauritania","mauritania","$5,000","2020 est.","173","Africa"
"Nigeria","nigeria","$4,900","2020 est.","174","Africa"
"Bangladesh","bangladesh","$4,800","2020 est.","175","South Asia"
"Kyrgyzstan","kyrgyzstan","$4,700","2020 est.","176","Central Asia"
"Pakistan","pakistan","$4,600","2020 est.","177","South Asia"
"Burma","burma","$4,500","2020 est.","178","East Asia/Southeast Asia"
"Tuvalu","tuvalu","$4,400","2020 est.","179","Australia - Oceania"
"Cambodia","cambodia","$4,200","2020 est.","180","East Asia/Southeast Asia"
"Kenya","kenya","$4,200","2020 est.","181","Africa"
"Papua New Guinea","papua-new-guinea","$4,100","2020 est.","182","East Asia/Southeast Asia"
"Sao Tome and Principe","sao-tome-and-principe","$4,100","2020 est.","183","Africa"
"Marshall Islands","marshall-islands","$4,000","2019 est.","184","Australia - Oceania"
"Sudan","sudan","$4,000","2020 est.","185","Africa"
"Nepal","nepal","$3,800","2020 est.","186","South Asia"
"Wallis and Futuna","wallis-and-futuna","$3,800","2004 est.","187","Australia - Oceania"
"Tajikistan","tajikistan","$3,700","2020 est.","188","Central Asia"
"Cameroon","cameroon","$3,600","2020 est.","189","Africa"
"Micronesia, Federated States of","micronesia-federated-states-of","$3,500","2019 est.","190","Australia - Oceania"
"Congo, Republic of the","congo-republic-of-the","$3,400","2020 est.","191","Africa"
"Benin","benin","$3,300","2020 est.","192","Africa"
"Senegal","senegal","$3,300","2020 est.","193","Africa"
"Zambia","zambia","$3,300","2020 est.","194","Africa"
"Timor-Leste","timor-leste","$3,200","2020 est.","195","East Asia/Southeast Asia"
"Comoros","comoros","$3,100","2020 est.","196","Africa"
"Syria","syria","$2,900","2015 est.","197","Middle East"
"Haiti","haiti","$2,800","2020 est.","198","Central America"
"Vanuatu","vanuatu","$2,800","2020 est.","199","Australia - Oceania"
"Guinea","guinea","$2,700","2020 est.","200","Africa"
"Zimbabwe","zimbabwe","$2,700","2020 est.","201","Africa"
"Tanzania","tanzania","$2,600","2020 est.","202","Africa"
"Solomon Islands","solomon-islands","$2,500","2020 est.","203","Australia - Oceania"
"Yemen","yemen","$2,500","2017 est.","204","Middle East"
"Ethiopia","ethiopia","$2,300","2020 est.","205","Africa"
"Kiribati","kiribati","$2,300","2020 est.","206","Australia - Oceania"
"Lesotho","lesotho","$2,300","2020 est.","207","Africa"
"Burkina Faso","burkina-faso","$2,200","2020 est.","208","Africa"
"Gambia, The","gambia-the","$2,200","2020 est.","209","Africa"
"Mali","mali","$2,200","2020 est.","210","Africa"
"Uganda","uganda","$2,200","2020 est.","211","Africa"
"Rwanda","rwanda","$2,100","2020 est.","212","Africa"
"Togo","togo","$2,100","2020 est.","213","Africa"
"Afghanistan","afghanistan","$2,000","2020 est.","214","South Asia"
"Guinea-Bissau","guinea-bissau","$1,800","2020 est.","215","Africa"
"Korea, North","korea-north","$1,700","2015 est.","216","East Asia/Southeast Asia"
"Eritrea","eritrea","$1,600","2017 est.","217","Africa"
"Sierra Leone","sierra-leone","$1,600","2020 est.","218","Africa"
"South Sudan","south-sudan","$1,600","2017 est.","219","Africa"
"Chad","chad","$1,500","2020 est.","220","Africa"
"Madagascar","madagascar","$1,500","2020 est.","221","Africa"
"Malawi","malawi","$1,500","2020 est.","222","Africa"
"Liberia","liberia","$1,400","2020 est.","223","Africa"
"Mozambique","mozambique","$1,200","2020 est.","224","Africa"
"Niger","niger","$1,200","2020 est.","225","Africa"
"Congo, Democratic Republic of the","congo-democratic-republic-of-the","$1,100","2020 est.","226","Africa"
"Central African Republic","central-african-republic","$900","2020 est.","227","Africa"
"Somalia","somalia","$800","2020 est.","228","Africa"
"Burundi","burundi","$700","2020 est.","229","Africa"
1 name slug value date_of_information ranking region
2 Liechtenstein liechtenstein $139,100 2009 est. 1 Europe
3 Monaco monaco $115,700 2015 est. 2 Europe
4 Luxembourg luxembourg $110,300 2020 est. 3 Europe
5 Singapore singapore $93,400 2020 est. 4 East Asia/Southeast Asia
6 Ireland ireland $89,700 2020 est. 5 Europe
7 Qatar qatar $85,300 2020 est. 6 Middle East
8 Isle of Man isle-of-man $84,600 2014 est. 7 Europe
9 Bermuda bermuda $81,800 2019 est. 8 North America
10 Cayman Islands cayman-islands $73,600 2019 est. 9 Central America
11 Falkland Islands (Islas Malvinas) falkland-islands-islas-malvinas $70,800 2015 est. 10 South America
12 Switzerland switzerland $68,400 2020 est. 11 Europe
13 United Arab Emirates united-arab-emirates $67,100 2019 est. 12 Middle East
14 Norway norway $63,600 2020 est. 13 Europe
15 Brunei brunei $62,200 2020 est. 14 East Asia/Southeast Asia
16 Gibraltar gibraltar $61,700 2014 est. 15 Europe
17 San Marino san-marino $60,800 2019 est. 16 Europe
18 United States united-states $60,200 2020 est. 17 North America
19 Jersey jersey $56,600 2016 est. 18 Europe
20 Hong Kong hong-kong $56,200 2020 est. 19 East Asia/Southeast Asia
21 Denmark denmark $55,900 2020 est. 20 Europe
22 Macau macau $54,800 2020 est. 21 East Asia/Southeast Asia
23 Netherlands netherlands $54,200 2020 est. 22 Europe
24 Guernsey guernsey $52,500 2014 est. 23 Europe
25 Iceland iceland $52,300 2020 est. 24 Europe
26 Austria austria $51,900 2020 est. 25 Europe
27 Germany germany $50,900 2020 est. 26 Europe
28 Sweden sweden $50,700 2020 est. 27 Europe
29 Andorra andorra $49,900 2015 est. 28 Europe
30 Kuwait kuwait $49,900 2019 est. 29 Middle East
31 Australia australia $48,700 2020 est. 30 Australia - Oceania
32 Belgium belgium $48,200 2020 est. 31 Europe
33 Finland finland $47,300 2020 est. 32 Europe
34 Saint Pierre and Miquelon saint-pierre-and-miquelon-2 $46,200 2006 est. 33 North America
35 Canada canada $45,900 2020 est. 34 North America
36 Saudi Arabia saudi-arabia $44,300 2020 est. 35 Middle East
37 New Zealand new-zealand $42,400 2020 est. 36 Australia - Oceania
38 Korea, South korea-south $42,300 2020 est. 37 East Asia/Southeast Asia
39 France france $42,000 2020 est. 38 Europe
40 Greenland greenland $41,800 2015 est. 39 North America
41 United Kingdom united-kingdom $41,600 2020 est. 40 Europe
42 Japan japan $41,400 2019 est. 41 East Asia/Southeast Asia
43 Bahrain bahrain $40,900 2020 est. 42 Middle East
44 Faroe Islands faroe-islands $40,000 2014 est. 43 Europe
45 Malta malta $39,200 2020 est. 44 Europe
46 Italy italy $39,000 2020 est. 45 Europe
47 Czechia czechia $38,300 2020 est. 46 Europe
48 Israel israel $38,300 2020 est. 47 Middle East
49 Cyprus cyprus $37,700 2020 est. 48 Europe
50 Aruba aruba $37,500 2017 est. 49 Central America
51 Virgin Islands virgin-islands $37,000 2016 est. 50 Central America
52 Lithuania lithuania $36,700 2020 est. 51 Europe
53 Slovenia slovenia $36,500 2020 est. 52 Europe
54 Spain spain $36,200 2020 est. 53 Europe
55 Estonia estonia $35,600 2020 est. 54 Europe
56 Guam guam $35,600 2016 est. 55 Australia - Oceania
57 Sint Maarten sint-maarten $35,300 2018 est. 56 Central America
58 British Virgin Islands british-virgin-islands $34,200 2017 est. 57 Central America
59 Montserrat montserrat $34,000 2011 est. 58 Central America
60 Puerto Rico puerto-rico $33,400 2020 est. 59 Central America
61 Poland poland $32,200 2020 est. 60 Europe
62 Portugal portugal $32,200 2020 est. 61 Europe
63 New Caledonia new-caledonia $31,100 2015 est. 62 Australia - Oceania
64 Hungary hungary $31,000 2020 est. 63 Europe
65 Bahamas, The bahamas-the $30,800 2020 est. 64 Central America
66 Slovakia slovakia $30,300 2020 est. 65 Europe
67 Latvia latvia $29,900 2020 est. 66 Europe
68 Romania romania $28,800 2020 est. 67 Europe
69 Turkey turkey $28,400 2020 est. 68 Middle East
70 Greece greece $27,300 2020 est. 69 Europe
71 Oman oman $27,300 2019 est. 70 Middle East
72 Croatia croatia $26,500 2020 est. 71 Europe
73 Russia russia $26,500 2020 est. 72 Central Asia
74 Malaysia malaysia $26,400 2020 est. 73 East Asia/Southeast Asia
75 Panama panama $25,400 2020 est. 74 Central America
76 Kazakhstan kazakhstan $25,300 2020 est. 75 Central Asia
77 Taiwan taiwan $24,502 2018 est. 76 East Asia/Southeast Asia
78 Curacao curacao $24,500 2019 est. 77 Central America
79 Northern Mariana Islands northern-mariana-islands $24,500 2016 est. 78 Australia - Oceania
80 Seychelles seychelles $24,400 2020 est. 79 Africa
81 Trinidad and Tobago trinidad-and-tobago $23,700 2020 est. 80 Central America
82 Chile chile $23,300 2020 est. 81 South America
83 Saint Kitts and Nevis saint-kitts-and-nevis $23,300 2020 est. 82 Central America
84 Bulgaria bulgaria $22,400 2020 est. 83 Europe
85 Uruguay uruguay $21,600 2020 est. 84 South America
86 Turks and Caicos Islands turks-and-caicos-islands $21,100 2020 est. 85 Central America
87 Argentina argentina $19,700 2020 est. 86 South America
88 Costa Rica costa-rica $19,700 2020 est. 87 Central America
89 Mauritius mauritius $19,500 2020 est. 88 Africa
90 Saint Martin saint-martin $19,300 2005 est. 89 Central America
91 Belarus belarus $19,100 2020 est. 90 Europe
92 Guyana guyana $18,700 2020 est. 91 South America
93 Montenegro montenegro $18,300 2020 est. 92 Europe
94 Serbia serbia $18,200 2020 est. 93 Europe
95 Antigua and Barbuda antigua-and-barbuda $18,000 2020 est. 94 Central America
96 Mexico mexico $17,900 2020 est. 95 North America
97 Palau palau $17,600 2019 est. 96 Australia - Oceania
98 Thailand thailand $17,300 2020 est. 97 East Asia/Southeast Asia
99 Dominican Republic dominican-republic $17,000 2020 est. 98 Central America
100 Equatorial Guinea equatorial-guinea $17,000 2020 est. 99 Africa
101 French Polynesia french-polynesia $17,000 2015 est. 100 Australia - Oceania
102 Cook Islands cook-islands $16,700 2016 est. 101 Australia - Oceania
103 China china $16,400 2020 est. 102 East Asia/Southeast Asia
104 Suriname suriname $16,100 2020 est. 103 South America
105 Botswana botswana $16,000 2020 est. 104 Africa
106 Turkmenistan turkmenistan $15,500 2019 est. 106 Central Asia
107 Grenada grenada $15,100 2020 est. 107 Central America
108 Gabon gabon $14,400 2020 est. 108 Africa
109 Bosnia and Herzegovina bosnia-and-herzegovina $14,300 2020 est. 109 Europe
110 Brazil brazil $14,100 2020 est. 110 South America
111 Georgia georgia $14,100 2020 est. 111 Middle East
112 Azerbaijan azerbaijan $13,700 2020 est. 112 Middle East
113 Nauru nauru $13,500 2019 est. 113 Australia - Oceania
114 Colombia colombia $13,400 2020 est. 114 South America
115 Albania albania $13,300 2020 est. 115 Europe
116 Maldives maldives $13,000 2020 est. 116 South Asia
117 Barbados barbados $12,900 2020 est. 117 Central America
118 Armenia armenia $12,600 2020 est. 118 Middle East
119 Sri Lanka sri-lanka $12,500 2020 est. 119 South Asia
120 Iran iran $12,400 2020 est. 120 Middle East
121 Ukraine ukraine $12,400 2020 est. 121 Europe
122 Cuba cuba $12,300 2016 est. 122 Central America
123 Moldova moldova $12,300 2020 est. 123 Europe
124 Paraguay paraguay $12,300 2020 est. 124 South America
125 Saint Lucia saint-lucia $12,300 2020 est. 125 Central America
126 Anguilla anguilla $12,200 2008 est. 126 Central America
127 Saint Vincent and the Grenadines saint-vincent-and-the-grenadines $12,100 2020 est. 127 Central America
128 Egypt egypt $12,000 2020 est. 128 Africa
129 Lebanon lebanon $11,600 2020 est. 129 Middle East
130 Mongolia mongolia $11,500 2020 est. 130 East Asia/Southeast Asia
131 South Africa south-africa $11,500 2020 est. 131 Africa
132 Indonesia indonesia $11,400 2020 est. 132 East Asia/Southeast Asia
133 Peru peru $11,300 2020 est. 133 South America
134 American Samoa american-samoa $11,200 2016 est. 134 Australia - Oceania
135 Fiji fiji $11,000 2020 est. 135 Australia - Oceania
136 Bhutan bhutan $10,900 2020 est. 136 South Asia
137 Kosovo kosovo $10,800 2020 est. 137 Europe
138 Algeria algeria $10,700 2020 est. 138 Africa
139 Ecuador ecuador $10,300 2020 est. 139 South America
140 Libya libya $10,300 2020 est. 140 Africa
141 Dominica dominica $9,900 2020 est. 141 Central America
142 Jordan jordan $9,800 2020 est. 142 Middle East
143 Tunisia tunisia $9,700 2020 est. 143 Africa
144 Iraq iraq $9,300 2020 est. 144 Middle East
145 Namibia namibia $8,900 2020 est. 145 Africa
146 Jamaica jamaica $8,700 2020 est. 146 Central America
147 Eswatini eswatini $8,400 2020 est. 147 Africa
148 Guatemala guatemala $8,400 2020 est. 148 Central America
149 Vietnam vietnam $8,200 2020 est. 149 East Asia/Southeast Asia
150 El Salvador el-salvador $8,100 2020 est. 150 Central America
151 Philippines philippines $8,000 2020 est. 151 East Asia/Southeast Asia
152 Bolivia bolivia $7,900 2020 est. 152 South America
153 Laos laos $7,800 2020 est. 153 East Asia/Southeast Asia
154 Saint Helena, Ascension, and Tristan da Cunha saint-helena-ascension-and-tristan-da-cunha $7,800 FY09/10 est. 154 Africa
155 Venezuela venezuela $7,704 2018 est. 155 South America
156 Uzbekistan uzbekistan $7,000 2020 est. 156 Central Asia
157 Morocco morocco $6,900 2020 est. 157 Africa
158 Tonga tonga $6,400 2019 est. 158 Australia - Oceania
159 Samoa samoa $6,300 2020 est. 159 Australia - Oceania
160 Gaza Strip gaza-strip $6,220 2019 est. 160 Middle East
161 Angola angola $6,200 2020 est. 161 Africa
162 Belize belize $6,100 2020 est. 162 Central America
163 India india $6,100 2020 est. 163 South Asia
164 Tokelau tokelau $6,004 2017 est. 164 Australia - Oceania
165 Cabo Verde cabo-verde $6,000 2020 est. 165 Africa
166 Niue niue $5,800 2003 est. 166 Australia - Oceania
167 Djibouti djibouti $5,500 2020 est. 167 Africa
168 West Bank west-bank $5,400 2020 est. 168 Middle East
169 Ghana ghana $5,300 2020 est. 169 Africa
170 Nicaragua nicaragua $5,300 2020 est. 170 Central America
171 Cote d'Ivoire cote-divoire $5,200 2020 est. 171 Africa
172 Honduras honduras $5,100 2020 est. 172 Central America
173 Mauritania mauritania $5,000 2020 est. 173 Africa
174 Nigeria nigeria $4,900 2020 est. 174 Africa
175 Bangladesh bangladesh $4,800 2020 est. 175 South Asia
176 Kyrgyzstan kyrgyzstan $4,700 2020 est. 176 Central Asia
177 Pakistan pakistan $4,600 2020 est. 177 South Asia
178 Burma burma $4,500 2020 est. 178 East Asia/Southeast Asia
179 Tuvalu tuvalu $4,400 2020 est. 179 Australia - Oceania
180 Cambodia cambodia $4,200 2020 est. 180 East Asia/Southeast Asia
181 Kenya kenya $4,200 2020 est. 181 Africa
182 Papua New Guinea papua-new-guinea $4,100 2020 est. 182 East Asia/Southeast Asia
183 Sao Tome and Principe sao-tome-and-principe $4,100 2020 est. 183 Africa
184 Marshall Islands marshall-islands $4,000 2019 est. 184 Australia - Oceania
185 Sudan sudan $4,000 2020 est. 185 Africa
186 Nepal nepal $3,800 2020 est. 186 South Asia
187 Wallis and Futuna wallis-and-futuna $3,800 2004 est. 187 Australia - Oceania
188 Tajikistan tajikistan $3,700 2020 est. 188 Central Asia
189 Cameroon cameroon $3,600 2020 est. 189 Africa
190 Micronesia, Federated States of micronesia-federated-states-of $3,500 2019 est. 190 Australia - Oceania
191 Congo, Republic of the congo-republic-of-the $3,400 2020 est. 191 Africa
192 Benin benin $3,300 2020 est. 192 Africa
193 Senegal senegal $3,300 2020 est. 193 Africa
194 Zambia zambia $3,300 2020 est. 194 Africa
195 Timor-Leste timor-leste $3,200 2020 est. 195 East Asia/Southeast Asia
196 Comoros comoros $3,100 2020 est. 196 Africa
197 Syria syria $2,900 2015 est. 197 Middle East
198 Haiti haiti $2,800 2020 est. 198 Central America
199 Vanuatu vanuatu $2,800 2020 est. 199 Australia - Oceania
200 Guinea guinea $2,700 2020 est. 200 Africa
201 Zimbabwe zimbabwe $2,700 2020 est. 201 Africa
202 Tanzania tanzania $2,600 2020 est. 202 Africa
203 Solomon Islands solomon-islands $2,500 2020 est. 203 Australia - Oceania
204 Yemen yemen $2,500 2017 est. 204 Middle East
205 Ethiopia ethiopia $2,300 2020 est. 205 Africa
206 Kiribati kiribati $2,300 2020 est. 206 Australia - Oceania
207 Lesotho lesotho $2,300 2020 est. 207 Africa
208 Burkina Faso burkina-faso $2,200 2020 est. 208 Africa
209 Gambia, The gambia-the $2,200 2020 est. 209 Africa
210 Mali mali $2,200 2020 est. 210 Africa
211 Uganda uganda $2,200 2020 est. 211 Africa
212 Rwanda rwanda $2,100 2020 est. 212 Africa
213 Togo togo $2,100 2020 est. 213 Africa
214 Afghanistan afghanistan $2,000 2020 est. 214 South Asia
215 Guinea-Bissau guinea-bissau $1,800 2020 est. 215 Africa
216 Korea, North korea-north $1,700 2015 est. 216 East Asia/Southeast Asia
217 Eritrea eritrea $1,600 2017 est. 217 Africa
218 Sierra Leone sierra-leone $1,600 2020 est. 218 Africa
219 South Sudan south-sudan $1,600 2017 est. 219 Africa
220 Chad chad $1,500 2020 est. 220 Africa
221 Madagascar madagascar $1,500 2020 est. 221 Africa
222 Malawi malawi $1,500 2020 est. 222 Africa
223 Liberia liberia $1,400 2020 est. 223 Africa
224 Mozambique mozambique $1,200 2020 est. 224 Africa
225 Niger niger $1,200 2020 est. 225 Africa
226 Congo, Democratic Republic of the congo-democratic-republic-of-the $1,100 2020 est. 226 Africa
227 Central African Republic central-african-republic $900 2020 est. 227 Africa
228 Somalia somalia $800 2020 est. 228 Africa
229 Burundi burundi $700 2020 est. 229 Africa

1
Laboratorio11/input.txt Normal file
View File

@@ -0,0 +1 @@
Faccio sesso e mi drogo tutto il giorno codando in C++

95
Laboratorio11/maze.py Normal file
View File

@@ -0,0 +1,95 @@
fio = open("maze.txt", "r")
maze_raw = fio.readlines()
fio.close()
xmax = len(maze_raw) - 1
ymax = len(maze_raw[0].strip()) - 1
maze = {}
sol = {}
for x in range(len(maze_raw)):
for y in range(len(maze_raw[x].strip())):
paths = set()
if x > 0:
if maze_raw[x - 1][y] == " ":
paths.add((x - 1, y))
if y > 0:
if maze_raw[x][y - 1] == " ":
paths.add((x, y - 1))
if maze_raw[x][y] == " ":
paths.add((x, y))
if y < ymax:
if maze_raw[x][y + 1] == " ":
paths.add((x, y + 1))
if x < xmax:
if maze_raw[x + 1][y] == " ":
paths.add((x + 1, y))
if len(paths) != 0:
maze[(x,y)] = paths
if maze_raw[x][y] == "*":
sol[(x,y)] = "*"
else:
sol[(x,y)] = "?"
for key in maze:
if key[0] == 0:
if maze_raw[key[0]][key[1]] == " ":
sol[key] = "N"
if key[0] == xmax:
if maze_raw[key[0]][key[1]] == " ":
sol[key] = "S"
if key[1] == 0:
if maze_raw[key[0]][key[1]] == " ":
sol[key] = "W"
if key[1] == ymax:
if maze_raw[key[0]][key[1]] == " ":
sol[key] = "E"
cont = True
def check(xi, yi):
global sol
return (xi, yi) in sol and sol[xi, yi] != "?" and sol[xi, yi] != "*"
while cont:
cont = False
for key in maze:
if sol[key] == "?":
if check(key[0] - 1, key[1]):
sol[key] = "N"
cont = True
continue
if check(key[0] + 1, key[1]):
sol[key] = "S"
cont = True
continue
if check(key[0], key[1] - 1):
sol[key] = "W"
cont = True
continue
if check(key[0], key[1] + 1):
sol[key] = "E"
cont = True
continue
for x in range(xmax+1):
for y in range(ymax+1):
print(sol[(x,y)],end="")
print()

9
Laboratorio11/maze.txt Normal file
View File

@@ -0,0 +1,9 @@
* *******
* * * *
* ***** *
* * * *
* * *** *
* * *
***** * *
* * *
******* *

View File

@@ -0,0 +1,22 @@
import csv
with open("export.csv") as csv_file:
csv_reader = csv.reader(csv_file)
line_count = 0
nations = {}
for row in csv_reader:
if line_count == 0:
print(f'Column names are {", ".join(row)}')
line_count += 1
else:
nations[row[0]] = row[2]
while True:
uinput = input("Inserisci il nome della nazione o quit: ")
if uinput == "quit":
break
print(nations[uinput])

1
Laboratorio11/output.txt Normal file
View File

@@ -0,0 +1 @@
Faccio ***** e mi drogo tutto il giorno codando in ***

View File

@@ -0,0 +1,33 @@
def sparseArraySum(a: dict, b: dict):
vsum = {}
ka = a.keys()
kb = b.keys()
sas = set()
for i in ka:
sas.add(i)
for i in kb:
sas.add(i)
for k in sas:
d = 0
e = 0
if k in a:
d = a[k]
if k in b:
e = b[k]
vsum[k] = d + e
return vsum
da = {5:4, 9:2, 10:9}
db = {5:4, 9:2, 2:3}
print(sparseArraySum(da, db))

16449
Laboratorio11/test Normal file

File diff suppressed because it is too large Load Diff