{"id":13658,"date":"2021-03-03T16:14:00","date_gmt":"2021-03-03T15:14:00","guid":{"rendered":"https:\/\/www.valcon.it\/python\/?p=13658"},"modified":"2026-05-22T12:49:43","modified_gmt":"2026-05-22T10:49:43","slug":"funzioni-21","status":"publish","type":"post","link":"https:\/\/www.valcon.it\/python\/funzioni-21\/","title":{"rendered":"Funzioni CON risultato 1"},"content":{"rendered":"\n<p>Osserva la suddivisione delle funzioni utente per numero di <strong>parametri<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><img decoding=\"async\" src=\"https:\/\/www.valcon.it\/python\/wp-content\/uploads\/def10.png\" alt=\"\"><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef pigreco(): return 3.14159               # Costante pi greco\ndef dado()   : return random.randint(1, 6)  # Numero casuale in &#x5B;1, 6]\n<\/pre><\/div>\n\n\n<p class=\"has-text-align-center\"><img decoding=\"async\" src=\"https:\/\/www.valcon.it\/python\/wp-content\/uploads\/def11.png\" alt=\"\"><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef quadrato(x)           : return x*x\ndef cubo(x)               : return x*x*x\ndef pari(n)               : return (n%2 == 0)\ndef bisestile(anno)       : ...\ndef num_divisori(n)       : ...\ndef num_divisori_propri(n): ...\ndef segno(x)              : ...\n<\/pre><\/div>\n\n\n<p class=\"has-text-align-center\"><img decoding=\"async\" src=\"https:\/\/www.valcon.it\/python\/wp-content\/uploads\/def12.png\" alt=\"\"><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef ipotenusa(c1, c2)         : ...\ndef max_2(x1, x2)             : ...\ndef MCD_2(n1, n2)             : ...\ndef mcm_2(n1, n2)             : ...\ndef media_2(x1, x2)           : ...\ndef media_2_armonica(x1, x2)  : ...\ndef media_2_geometrica(x1, x2): ...\ndef min_2(x1, x2)             : ...\ndef uguali(x1, x2)            : ...\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">&#8230;<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef max_3(x1, x2, x3)             : ...\ndef MCD_3(n1, n2, n3)             : ...\ndef mcm_3(n1, n2, n3)             : ...\ndef media_3(x1, x2, x3)           : ...\ndef media_3_armonica(x1, x2, x3)  : ...\ndef media_3_geometrica(x1, x2, x3): ...\ndef min_3(x1, x2, x3)             : ...\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Osserva la suddivisione delle funzioni utente per numero di parametri &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"_links":{"self":[{"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/posts\/13658"}],"collection":[{"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/comments?post=13658"}],"version-history":[{"count":34,"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/posts\/13658\/revisions"}],"predecessor-version":[{"id":30914,"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/posts\/13658\/revisions\/30914"}],"wp:attachment":[{"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/media?parent=13658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/categories?post=13658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.valcon.it\/python\/wp-json\/wp\/v2\/tags?post=13658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}