How to learn to program from Donald Trump’s Tweet (includes code)

Karan Jagota
Level Up Coding
Published in
3 min readNov 12, 2020

--

Learn a programming concept from one of the President’s tweets.

Photo By: Karan Jagota

This post is neither about Donald Trump nor about the US elections 2020. I am just trying to create a viral post from one of the latest Donald Trump’s tweets. So, bear it with me, just like you, with his 3:00 am tweets. I request each of you to keep the politics aside and focus on learning the coding concept.

source: https://twitter.com/realDonaldTrump/status/1324353932022480896

In programming, while writing loops, we often encounter a situation where we would want to stop it based on a condition. If any of the above words find you confusing, then don’t worry! You will learn it all in this post. Just keep reading.

There are a few things that you need to know to understand the rest of the post. If you have a non-tech background, then you would need to know some of the technical programming terms to understand the context of this post. They are as follows -

Data Structure

It is a collection of data values of the same data type. For instance, a list is a data structure that can hold multiple data values.

list = [1,2,3,4,5,6,7,8,910]

--

--