create account

My Coding Quiz #47 by eniolw

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

<center><h2>My Coding Quiz #47 👨‍💻🛠️🧩</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/DQmThbfejjXR4QbVXagLiQ4ry9vgMwMXJCaNK8wcXByeLME/imagen.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-46">previous quiz</a>:</b> <b>'eniolw.com '</b>. This riddle script is simple. It all comes down to knowing the built-in <code>lstrip</code> method. Do you know what it does? Well, it removes all the characters you provide as arguments from the string where it is applied, <i>as long as those characters are at the beginning of the string</i>.</p>

<p>As in our code we specified <code>txt.lstrip("@.")</code>, both <code>@</code> and <code>.</code> will be removed from the initial part of the string contained in <code>txt</code>. That string is <code>"@eniolw.com "</code>, so the function removes the <code>@</code> character, but not the <code>.</code> character, since it cannot be considered to be at the beginning of the string. As a consequence, the given characters that do not satisfy that condition are ignored without raising an exception.</p>

<p>The resulting new string stored in the variable <code>res</code> is <b>"eniolw.com "</b>. Note that the <code>lstrip</code> method does the above, but it does not remove the whitespaces at the beginning and end of the string, as the <code>strip</code> method would do, which is why the whitespace at the end is preserved here. Did you know this or were you tricked?</p>

<p>Frankly, I find the <code>lstrip</code> method unusual, but it may have some applications. It can be useful for removing that <b>@</b> as we already saw, and it can also remove other prefixes like <b>https://</b>, etc.</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 #47 👨‍💻🛠️🧩</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/DQmUWyyhUmNmnNq742zgFygXtZRA9VqQL1BfwfgbwecSTms/imagen.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-46">quiz anterior</a>:</b> <b>'eniolw.com '</b>. Este script de acertijo es simple. Todo se reduce a conocer el método integrado <code>lstrip</code>. ¿Sabes lo que hace? Bueno, elimina todos los caracteres que proporcionas como argumentos de la cadena donde se aplica, <i>siempre que esos caracteres estén al principio de la cadena</i>.</p>

<p>Como en nuestro código especificamos <code>txt.lstrip("@.")</code>, tanto <code>@</code> como <code>.</code> se eliminarán de la primera parte de la cadena contenida en <code>txt</code>. Esa cadena es <code>"@eniolw.com "</code>, por lo que la función elimina el carácter <code>@</code>, pero no el carácter <code>.</code>, ya que no se puede considerar que está al principio de la cadena. Como consecuencia, los caracteres dados que no cumplen esa condición se ignoran sin generar una excepción.</p>

<p>La nueva cadena resultante almacenada en la variable <code>res</code> es <b>"eniolw.com "</b>. Ten en cuenta que el método <code>lstrip</code> hace lo anteriormente dicho, más no elimina los espacios en blanco al principio y al final de la cadena, como lo haría el método <code>strip</code>, razón por la cual el espacio en blanco al final se conserva aquí. ¿Sabías esto o te dejaste truquear?</p>

<p>Francamente, el método <code>lstrip</code> me parece inusual, pero puede tener algunas aplicaciones. Puede ser útil para eliminar ese <b>@</b> como ya vimos, y también puede eliminar otros prefijos como <b>https://</b>, etc.</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 644 others
properties (23)
authoreniolw
permlinkmy-coding-quiz-47
categoryhive-197685
json_metadata"{"image":["https://images.ecency.com/DQmThbfejjXR4QbVXagLiQ4ry9vgMwMXJCaNK8wcXByeLME/imagen.png","https://images.ecency.com/DQmUWyyhUmNmnNq742zgFygXtZRA9VqQL1BfwfgbwecSTms/imagen.png"],"tags":["hive-197685","programming","coding","python","quiz","neoxian","proofofbrain","waivio","creativecoin","spanish"],"description":"My Coding Quiz #47 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 fun way.","app":"ecency/3.0.37-vision","format":"markdown+html","image_ratios":["1.2285","1.2285"]}"
created2024-02-22 00:58:33
last_update2024-02-22 00:58:33
depth0
children8
last_payout2024-02-29 00:58:33
cashout_time1969-12-31 23:59:59
total_payout_value8.110 HBD
curator_payout_value7.990 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,132
author_reputation201,287,818,788,080
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,484,052
net_rshares35,194,834,347,992
author_curate_reward""
vote details (708)
@indiaunited ·
Indiaunited Curation 1708571669054
This post has been manually curated by @bhattg from Indiaunited community. Join us on our [Discord Server](https://discord.gg/bGmS2tE). 

Do you know that you can earn a passive income by delegating to @indiaunited. We share more than 100 % of the curation rewards with the delegators in the form of IUC tokens. HP delegators and IUC token holders also get upto 20% additional vote weight. 

Here are some handy links for delegations: [100HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=173705.23295692893%20VESTS), [250HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=434263.0823923223%20VESTS), [500HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=868526.1647846446%20VESTS), [1000HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=1737052.3295692892%20VESTS). 

[![image.png](https://files.peakd.com/file/peakd-hive/bala41288/46eaz12N-image.png)](https://discord.gg/bGmS2tE) 

<sub>**100% of the rewards from this comment goes to the curator for their manual curation efforts. Please encourage the curator @bhattg by upvoting this comment and support the community by voting the posts made by @indiaunited.**</sub>
properties (22)
authorindiaunited
permlinkindiaunited-1708571669054
categoryhive-197685
json_metadata{"app":"hiveblog/0.1","format":"markdown","tags":["hive-197685","programming","coding","python","quiz","neoxian","proofofbrain","waivio","creativecoin","spanish"]}
created2024-02-22 03:14:30
last_update2024-02-22 03:14:30
depth1
children1
last_payout2024-02-29 03:14:33
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,328
author_reputation61,759,637,706,192
root_title"My Coding Quiz #47"
beneficiaries
0.
accountbhattg
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,487,759
net_rshares0
@eniolw ·
Thank you!
properties (22)
authoreniolw
permlinkre-indiaunited-2024222t125257972z
categoryhive-197685
json_metadata{"tags":["hive-197685","programming","coding","python","quiz","neoxian","proofofbrain","waivio","creativecoin","spanish"],"app":"ecency/3.0.37-vision","format":"markdown+html"}
created2024-02-22 16:52:57
last_update2024-02-22 16:52:57
depth2
children0
last_payout2024-02-29 16:52:57
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_length10
author_reputation201,287,818,788,080
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,501,042
net_rshares0
@miriannalis ·
Interesante! 

@tipu curate 8
properties (22)
authormiriannalis
permlinkre-eniolw-s9bdxa
categoryhive-197685
json_metadata{"tags":["hive-197685"],"app":"peakd/2024.1.1"}
created2024-02-23 15:05:36
last_update2024-02-23 15:05:36
depth1
children1
last_payout2024-03-01 15:05:36
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_length29
author_reputation257,682,878,360,958
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,529,085
net_rshares0
@tipu ·
<a href="https://tipu.online/hive_curator?miriannalis" target="_blank">Upvoted  &#128076;</a> (Mana: 0/75) <a href="https://peakd.com/hive/@reward.app/reward-app-quick-guide-updated" target="_blank">Liquid rewards</a>.
properties (22)
authortipu
permlinkre-re-eniolw-s9bdxa-20240223t150546z
categoryhive-197685
json_metadata"{"app": "beem/0.24.26"}"
created2024-02-23 15:05:45
last_update2024-02-23 15:05:45
depth2
children0
last_payout2024-03-01 15:05:45
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_length218
author_reputation55,210,675,335,035
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,529,088
net_rshares0
@serenecounsel ·
What a coding quiz that engaged! Posts like yours always offer such valuable ideas on programming concepts. Trust me, you have some very great blogs and I will learn more about how to code through them. Keep up the good work!
properties (22)
authorserenecounsel
permlinkre-eniolw-s99gp6
categoryhive-197685
json_metadata{"tags":["hive-197685"],"app":"peakd/2024.1.1"}
created2024-02-22 14:10:21
last_update2024-02-22 14:10:21
depth1
children2
last_payout2024-02-29 14:10:21
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_length225
author_reputation14,533,055,010,216
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,497,831
net_rshares0
@eniolw ·
Thank you
👍  
properties (23)
authoreniolw
permlinkre-serenecounsel-2024222t125449561z
categoryhive-197685
json_metadata{"tags":["hive-197685"],"app":"ecency/3.0.37-vision","format":"markdown+html"}
created2024-02-22 16:54:51
last_update2024-02-22 16:54:51
depth2
children1
last_payout2024-02-29 16:54: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_length9
author_reputation201,287,818,788,080
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,501,074
net_rshares2,703,196,163
author_curate_reward""
vote details (1)
@serenecounsel ·
You're welcome Sir.
properties (22)
authorserenecounsel
permlinkre-eniolw-s99ona
categoryhive-197685
json_metadata{"tags":["hive-197685"],"app":"peakd/2024.1.1"}
created2024-02-22 17:02:00
last_update2024-02-22 17:02:00
depth3
children0
last_payout2024-02-29 17:02:00
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_length19
author_reputation14,533,055,010,216
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,501,217
net_rshares0
@stemsocial ·
re-eniolw-my-coding-quiz-47-20240222t222839522z
<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-47-20240222t222839522z
categoryhive-197685
json_metadata{"app":"STEMsocial"}
created2024-02-22 22:28:39
last_update2024-02-22 22:28:39
depth1
children0
last_payout2024-02-29 22:28: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,463,635,119,853
root_title"My Coding Quiz #47"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,511,343
net_rshares0