create account

My Coding Quiz #20 by eniolw

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

<center><h2>My Coding Quiz #20 👨‍💻🛠️🧩</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/DQmQRfTBhprS37SCWJLBUFEEC8tvYDFH7B3CE4kYNMPZ4yG/quiz_img_en.png" alt="Quiz">
<h6>By @eniolw</h6>
</center>

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

<p><b>Solution to the <a href="/@eniolw/my-coding-quiz-19">previous quiz</a>:</b> <b>('coding ', 'is', ' fun')</b>. Line 1 defines a seemingly meaningless string <code>a</code>. Line 2 reverses this using the familiar slice notation, creating a new string <code>b</code>. Its content will be <b>'coding is fun'</b>.</p>

<p>Line 3 applies the <code>partition</code> method which is less known, although somewhat similar to split. What it does is look for the string given as an argument and return a three-element tuple. If there is an occurrence, the tuple will be formed by: 1) what is before the first occurrence, 2) the first occurrence and 3) what is after the first occurrence.</p>

<p>In the case of the string <code>b</code>, since the string <code>"is"</code> was specified to the <code>partition</code> method applied to the string 'coding is fun ', this will return the tuple <b>('coding ', 'is', ' fun')</b>. Note that white spaces are preserved, as they are valid characters.</p>

<p>The enthusiast @splash-of-angs63 solved this test satisfactorily.</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> and others.</p>

<hr>

<center><h2>Mi Quiz de Programación #20 👨‍💻🛠️🧩</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/DQmXZtVehwoeL2Jw2nCAHmSrwEWfyKMZTqMCUerxdv1LbCm/quiz_img_es.png" alt="Quiz">
<h6>Por @eniolw</h6>
</center>

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

<p><b>Solución al <a href="/@eniolw/my-coding-quiz-19">quiz anterior</a>:</b> <b>('coding ', 'is', ' fun')</b>. La línea 1 define un string <code>a</code> aparentemente sin sentido. La línea 2 lo invierte usando la conocida notación de rebanada, creando un nuevo string <code>b</code>. Su contenido será <b>'coding is fun'</b>.</p>

<p>La línea 3 le aplica el método <code>partition</code> que es menos conocido, aunque algo similar a split. Lo que hace es buscar la cadena dada como argumento y devolver una tupla de tres elementos. En caso de haber una ocurrencia, la tupla estará formada por: 1) lo que esté antes de la primera ocurrencia, 2) la primera ocurrencia y 3) lo que esté tras la primera ocurrencia.</p>

<p>En el caso del string <code>b</code>, dado que se especificó la cadena <code>"is"</code> al método <code>partition</code> aplicado al string 'coding is fun', este regresará la tupla <b>('coding ', 'is', ' fun')</b>. Nótese que los espacios en blanco se preservan, pues son caracteres válidos.</p>

<p>El entusiasta @splash-of-angs63 resolvió este test satisfactoriamente.</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> y otras.</p>

</div>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 760 others
properties (23)
authoreniolw
permlinkmy-coding-quiz-20
categoryhive-196387
json_metadata"{"image": ["https://images.ecency.com/DQmQRfTBhprS37SCWJLBUFEEC8tvYDFH7B3CE4kYNMPZ4yG/quiz_img_en.png", "https://images.ecency.com/DQmXZtVehwoeL2Jw2nCAHmSrwEWfyKMZTqMCUerxdv1LbCm/quiz_img_es.png"], "thumbnails": ["https://images.ecency.com/DQmQRfTBhprS37SCWJLBUFEEC8tvYDFH7B3CE4kYNMPZ4yG/quiz_img_en.png", "https://images.ecency.com/DQmXZtVehwoeL2Jw2nCAHmSrwEWfyKMZTqMCUerxdv1LbCm/quiz_img_es.png"], "tags": ["hive-196387", "programming", "coding", "python", "quiz", "stem", "proofofbrain", "creativecoin", "neoxian", "spanish"], "app": "ecency/3.0.36-vision", "format": "markdown+html"}"
created2023-09-12 09:31:00
last_update2023-09-12 09:31:00
depth0
children2
last_payout2023-09-19 09:31:00
cashout_time1969-12-31 23:59:59
total_payout_value5.916 HBD
curator_payout_value5.794 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,261
author_reputation255,223,074,416,427
root_title"My Coding Quiz #20"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id127,076,907
net_rshares29,328,960,788,688
author_curate_reward""
vote details (824)
@stemsocial ·
re-eniolw-my-coding-quiz-20-20230913t063951189z
<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-20-20230913t063951189z
categoryhive-196387
json_metadata{"app":"STEMsocial"}
created2023-09-13 06:39:51
last_update2023-09-13 06:39:51
depth1
children0
last_payout2023-09-20 06:39:51
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,918,229,493,305
root_title"My Coding Quiz #20"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id127,103,202
net_rshares0
@timix648 ·
Hmmm..your quizzes tempt me to keep web development classes and learn python lol😅😅
properties (22)
authortimix648
permlinkre-eniolw-s0xxka
categoryhive-196387
json_metadata{"tags":["hive-196387"],"app":"peakd/2023.8.1"}
created2023-09-13 20:14:42
last_update2023-09-13 20:14:42
depth1
children0
last_payout2023-09-20 20:14: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_length82
author_reputation25,155,469,453,344
root_title"My Coding Quiz #20"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id127,120,921
net_rshares0