Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simple-sitemap domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u246705441/domains/gangofcrypto.com/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ultimate-member domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u246705441/domains/gangofcrypto.com/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u246705441/domains/gangofcrypto.com/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wpforms-lite domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u246705441/domains/gangofcrypto.com/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u246705441/domains/gangofcrypto.com/public_html/wp-includes/functions.php on line 6114
Programming with Python - Gang of Crypto
programming-with-python-GOC-gang-of-crypto

Programming with Python

Example Program in Python

Hello, world!

Now that you have got an idea of what python code looks like. Let’s check out one of the basic examples and dive deeper into what’s going on. Get ready. We are going to use the Python interpreter to make our computer say hello to the world.

When we run this code either locally on our machine or on a web interpreter, the words hello world appear on the screen, just like magic. Actually it’s not magic. It’s because print is a Python function that writes what we tell it to on the screen. 

In Python, the hello world example is just one line, in C, it’s three lines, in other languages it can be even more. While learning to write,  hello world won’t teach you the whole language, it gives you a first impression of how functions are used, and how a program written in that language looks.

//Example program of Python
friends=["Mike","Alexa","Cara","Mon-el"]
for a friend in friends:
    print("Hi"+friend) 
OUTPUT:

Hi Mike
Hi Alex
Hi Cara
Hi Mon-el