create account

My Coding Quiz #4 by eniolw

View this thread on: hive.blogpeakd.comecency.com
· @eniolw ·
$8.82
My Coding Quiz #4
<div class="text-justify">

<center><h2>My Coding Quiz #4 👨‍💻🛠️🧩</h2></center>

<p>Welcome to the new installment of my series of <b>Coding Quizzes</b>, in which you will be able to test your knowledge and skills about programming and software development in a simple and fun way. If you want to learn more about it visit <a href="/@eniolw">my blog</a> here on Hive and the <a href="/@eniolw/my-coding-quiz-1">first post</a> where I introduced it.</p>

<h3>Without further ado, here's the riddle...</h3>

<br><center><img src="https://images.ecency.com/DQmYu2wiAKjJkoLvHAc9dA3pmJ1jxYcDhb5ME63e3ZXk47t/quiz_img_en.png" alt="Quiz"></center>

<br><center><h3>What's your choice?</h3></center>

<p><b>Solution to the <a href="/@eniolw/my-coding-quiz-3">previous quiz</a>:</b> <b>None, [-1, 4, 6]</b>. In line 1 a list of numerical elements (<code>a = [6, 4, -1]</code>) is created and the same happens in line 2  (<code>a = [1, 0]</code>); nothing special so far.</p>
    
<p>Line 3 is where the heart of the matter lies. It contains: <code>print(b.sort(), sorted(a))</code>. The <code>sort</code> method is built-in to Python lists and what it does is to modify the list itself, in this case the one referenced with the identifier <code>b</code>. This function returns <code>None</code>. In contrast, the built-in <code>sorted</code> function returns a new list from an iterable. That is what differentiates the two functions. You probably knew it, because the previous post talked about it too. So <b>None, [-1, 4, 6]</b> is the expected output.</p>

<hr>

<p>If you want to blog about computer science and programming content, I invite you to join <a href="/">Hive</a> and participate in its communities, such as <a href="/created/hive-196387">STEM-social</a>, <a href="/created/hive-154226">Develop Spanish</a>, <a href="/created/hive-169321">Programming & Dev</a>,  <a href="/created/hive-153850">Hive Learners</a> and others.</p>

<hr>

<center><h2>Mi Quiz de Programación #4 👨‍💻🛠️🧩</h2></center>

<p>Bienvenido a mi nueva serie de <b>Quizzes de Programación</b>, en la cual podrás poner a prueba tus conocimientos y habilidades sobre programación y desarrollo de software de una manera sencilla y divertida.  Si quieres aprender más sobre ella visita <a href="/@eniolw">mi blog</a> aquí en Hive y el <a href="/@eniolw/my-coding-quiz-1">primer post</a> donde la presenté.</p>

<h3>Sin más preámbulos, he aquí el acertijo...</h3>

<br><center><img src="https://images.ecency.com/DQmdN9Uu9TuhC2F3MFLfAP5KgE7ZKfqEYgdEv9vMyMGv4dJ/quiz_img_es.png" alt="Quiz"></center>

<br><center><h3>¿Cuál es tu elección?</h3></center>

<p><b>Solución al <a href="/@eniolw/my-coding-quiz-3">quiz anterior</a>:</b> <b>None, [-1, 4, 6]</b>. En la línea 1 se crea una lista de elementos numéricos (<code>a = [6, 4, -1]</code>) y lo mismo ocurre en la línea 2 (<code>a = [1, 0]</code>); nada especial hasta ahora.</p>

<p>La línea 3 es la que contiene la esencia del asunto. Esta contiene: <code>print(b.sort(), sorted(a))</code>. El método <code>sort</code> está integrado en las listas de Python y lo que hace es modificar la propia lista, en este caso aquella referenciada con el identificador <code>b</code>. Esa función retorna <code>None</code>. Por el contrario, la función integrada <code>sorted</code> retorna una nueva lista a partir de un iterable. Eso es lo que diferencia a ambas funciones. Probablemente lo sabías, pues además el anterior post hablaba de ello también. De tal modo que <b>None, [-1, 4, 6]</b> es la salida esperada.</p>

<hr>

<p>Si quieres bloguear sobre contenido informático y de programación, te invito a unirte a <a href="/">Hive</a> y participar en sus comunidades, tales como <a href="/created/hive-196387">STEM-social</a>, <a href="/created/hive-154226">Develop Spanish</a>, <a href="/created/hive-169321">Programming & Dev</a>, <a href="/created/hive-153850">Hive Learners</a> y otras.</p>

</div>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 464 others
properties (23)
authoreniolw
permlinkmy-coding-quiz-4
categoryhive-154226
json_metadata"{"image": ["https://images.ecency.com/DQmYu2wiAKjJkoLvHAc9dA3pmJ1jxYcDhb5ME63e3ZXk47t/quiz_img_en.png", "https://images.ecency.com/DQmdN9Uu9TuhC2F3MFLfAP5KgE7ZKfqEYgdEv9vMyMGv4dJ/quiz_img_es.png"], "thumbnails": ["https://images.ecency.com/DQmYu2wiAKjJkoLvHAc9dA3pmJ1jxYcDhb5ME63e3ZXk47t/quiz_img_en.png", "https://images.ecency.com/DQmdN9Uu9TuhC2F3MFLfAP5KgE7ZKfqEYgdEv9vMyMGv4dJ/quiz_img_es.png"], "tags": ["hive-154226", "programming", "coding", "python", "software", "technology", "spanish", "neoxian", "proofofbrain", "creativecoin"], "description": "Welcome to the new installment of my series of Coding Quizzes, in which you will be able to test your knowledge and skills about programming and software development in a simple and fun way.", "app": "ecency/3.0.33-vision", "format": "markdown+html"}"
created2023-06-30 09:01:27
last_update2023-06-30 09:01:27
depth0
children4
last_payout2023-07-07 09:01:27
cashout_time1969-12-31 23:59:59
total_payout_value4.455 HBD
curator_payout_value4.368 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,915
author_reputation253,649,090,566,855
root_title"My Coding Quiz #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,904,885
net_rshares19,688,296,088,843
author_curate_reward""
vote details (528)
@hivebuzz ·
Congratulations @eniolw! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

<table><tr><td><img src="https://images.hive.blog/60x60/http://hivebuzz.me/badges/postallmonth.png"></td><td>You have been a buzzy bee and  published a post every day of the month.</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@eniolw) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Check out our last posts:**
<table><tr><td><a href="/hive-122221/@hivebuzz/pum-202307"><img src="https://images.hive.blog/64x128/https://i.imgur.com/M9RD8KS.png"></a></td><td><a href="/hive-122221/@hivebuzz/pum-202307">Be ready for the July edition of the Hive Power Up Month!</a></td></tr><tr><td><a href="/hive-122221/@hivebuzz/pud-202307"><img src="https://images.hive.blog/64x128/https://i.imgur.com/805FIIt.jpg"></a></td><td><a href="/hive-122221/@hivebuzz/pud-202307">Hive Power Up Day - July 1st 2023</a></td></tr><tr><td><a href="/hive-106258/@hivebuzz/hivefest-trf-2023"><img src="https://images.hive.blog/64x128/https://files.peakd.com/file/peakd-hive/hivebuzz/23wC7eJH6F57ZLKQHzTxzC23zx8AzVrmxWD6PyZtoHcCjQafpgtZyNrpVjoVY1cYLKmYH.png"></a></td><td><a href="/hive-106258/@hivebuzz/hivefest-trf-2023">Announcing the Travel Reimbursement Fund for HiveFest⁸</a></td></tr></table>
properties (22)
authorhivebuzz
permlinknotify-eniolw-20230701t015404
categoryhive-154226
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2023-07-01 01:54:03
last_update2023-07-01 01:54:03
depth1
children0
last_payout2023-07-08 01:54:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,491
author_reputation369,247,857,889,910
root_title"My Coding Quiz #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,925,458
net_rshares0
@stemsocial ·
re-eniolw-my-coding-quiz-4-20230701t093039650z
<div class='text-justify'> <div class='pull-left'>
 <img src='https://stem.openhive.network/images/stemsocialsupport7.png'> </div>

Thanks for your contribution to the <a href='/trending/hive-196387'>STEMsocial community</a>. Feel free to join us on <a href='https://discord.gg/9c7pKVD'>discord</a> to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.&nbsp;<br />&nbsp;<br />
</div>
properties (22)
authorstemsocial
permlinkre-eniolw-my-coding-quiz-4-20230701t093039650z
categoryhive-154226
json_metadata{"app":"STEMsocial"}
created2023-07-01 09:30:39
last_update2023-07-01 09:30:39
depth1
children0
last_payout2023-07-08 09:30:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length565
author_reputation22,905,425,648,299
root_title"My Coding Quiz #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,933,656
net_rshares0
@zuerich ·
properties (23)
authorzuerich
permlinkre-eniolw-rx2qi5
categoryhive-154226
json_metadata{"tags":["hive-154226"],"app":"peakd/2023.6.5"}
created2023-06-30 16:15:42
last_update2023-06-30 16:15:42
depth1
children1
last_payout2023-07-07 16:15:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2
author_reputation170,045,815,505,300
root_title"My Coding Quiz #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,912,899
net_rshares1,263,409,797
author_curate_reward""
vote details (6)
@eniolw ·
That's correct! I will reveal the details of the solution in the next installment.
properties (22)
authoreniolw
permlinkre-zuerich-2023630t181830575z
categoryhive-154226
json_metadata{"tags":["hive-154226"],"app":"ecency/3.0.33-vision","format":"markdown+html"}
created2023-06-30 22:18:30
last_update2023-06-30 22:18:30
depth2
children0
last_payout2023-07-07 22:18:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length82
author_reputation253,649,090,566,855
root_title"My Coding Quiz #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,920,610
net_rshares0