Science Challenge Result # 4 - Can you solve this computer logic?

in #steemstem3 years ago

Not counting most of the witnesses, I can say for sure there are at the very least 38 programmers here on Steemit which is a great news. We know that the platform is full of potential and the ability to create new applications to work with the Steem ecosystem.

 (Credit: here

What was the challenge all about?

The challenge was to solve a simple computer logic to see if there are Steemians out there who are able to solve it. Of course it was nothing out of the extra ordinary and if some one knew what loops are, they would have been able to find the correct answer.

I have tweaked the initial coding a bit to give the answer for each loop till we get the final answer.

Importance of loops!!

In programming terms, a loop is a very powerful feature. It allows you to iterate through each set of data and manipulate the data such that the end result of a complex structure can be quickly deduced if you are able to represent that structure using a loop.

Instead of manually, on paper, to write down each solution of each loop, a computer can go through those loops in milliseconds and give you the right answer. Of course provided that you understand the logic to put in the loop.

Weather forecasting, any kind of simulation, any repeating pattern, or even AI development requires loops. You can feed the result of the first loop to the same loop and get a different answer for the second loop and keep on going till you loop through the number of loops that you have defined initially.

If you know the initial conditions of the start of the universe and the laws that dictate it, you can write it in a loop and see after 10 years, 10 million years or 10 billion years, what the outcome would be!!!

Limitations of loops

If we could get the answer to the universe structure through a loop, why we didn't do it till now? The answer is really simple. For complex answers, loops tend to be very inefficient. It can take years or centuries before it gives the final answer.

We hit a major breaking point when the value to be stored in the computer memory is far greater than the value that we have at hand. A computer can hold a big value but if we take the values that will be generated in the equation for life, it is a really huge number for a computer to calculate. 

A loop can be really unpredictable when it comes to complex equations. We might think that our computers are powerful enough to handle every type of numbers but there exists numbers beyond that computers cannot handle and that is why scientists use supercomputers or mainframes.

These are computers with high processing powers, huge memories and run on poweful but really efficient programs. If calculating the birth of the universe and follow the path of life would have been that easy, today's computer would have surely solved the mystery.

The winners

 The right answer for the question  "Can you solve this computer logic?" is  C - $initialValue = 12, 3 loops.

 (Credit: here)  

 The post payout is in some 12 hours but we already have the winners (38 in total):  

@javifo, @alexmove, @jahangirwifii, @ir3k, @sky777, @eugheny.borodin, @lavanyalakshman, @crypticalias, @cryptictruth, @sazih, @redbaron90, @hawk399, @drishitmitra, @royaleagle, @cobmaximus, @alxmuh, @laxam, @sunnyali, @sanoza, @crokkon, @mzee, @artibeus, @rayne122, @dexterdev, @treslotos, @neokuduk, @aneninen, @mandarinaad, @aamirijaz, @umarkhayyam, @alan083, @azharhussain, @basit90, @biolegria, @nihalmaz, @crypto-maestro, @mental-extract, @v007007007

Types of loops

  1. Do-while loops (like the one used in this challenge)
  2. While loop
  3. For loo

These are the major and perhaps the only loops used for programming. I have worked with C, C++, .NET, PHP and JAVA and these are the only loops that I have used. They are really powerful to get results in milliseconds provided that the loops does not break the memory limit or the execution timeout.

Conclusion

I am glad that there are so many programmers on the Steemit platform. If you are not a programmer and a winner, your logical thinking is really good! You are on the right direction :)

With time, the questions are going to be increased in difficulty so that we keep enjoying ourselves while learning something new everytime!


Want to try your luck? Why not play the Steemit Lotto Game on this post to change your mind: Steemit Lotto Weekly # 16 - Minimum Pot Size 54 STEEM!!!!

Good luck to everyone  ? 


Don't forget to check if you are a winner every Saturday and Sunday at around 19 00 (GMT)

(adatpted from 3D Lines Steemit Logo Reveal)

Sort:  

Programming is all double Dutch to me I have to admit

Haha but it can be really easy once you learn the fundamentals. All programming have the same base :)

Thanks mate ☺️

You're welcome man and congrats XD

Thank you, i enjoy so much your contests! Can.t wait for next ones:)

Thanks for the encouragement XD

Really glad that you are enjoying the challenges :)

You got a 45.00% upvote from @whalebuilder courtesy of @pisolutionsmru. Join @whalebuilder family at our Discord Channel. Don't let your precious stake(SP) go stale...Make it do more so you have to do less. Deligate it to @whalebuilder by clicking on one of the ready to delegate links: 50SP | 100SP | 250SP | 500SP | 1000SP | 5000SP | custom amount.

You got a 41.39% upvote from @adriatik courtesy of @pisolutionsmru!

This post has received a 12.38% upvote from @msp-bidbot thanks to: @pisolutionsmru. Delegate SP to this public bot and get paid daily: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP Don't delegate so much that you have less than 50SP left on your account.

9
i love the grafix

Coin Marketplace

STEEM 0.38
TRX 0.06
JST 0.041
BTC 33922.99
ETH 2152.91
USDT 1.00
SBD 6.14