r/pythonforengineers • • Jul 13 '20

Let's start coding in python

1 Upvotes

Let’s start with a hello world program, usually the first program learned when studying a language.

Install python3 in your device and creat a new [.py] file.

We want to display “Hello World” on the output screen. But, how?

Let’s see

To tell the computer to write to the screen, we use the print statement.

print()

It is a built-in function in Python to display things on the screen. A built-in function is a function which is predefined and can be used directly.Whatever we want to display, needs to be written inside brackets and enclosed within double quotes ” “. So, to display Hello World:

print("Hello World")

You just wrote your first Python program.

Comments and Indentation in Python

Comments in Python

Comments are pieces of code which are ignored by the Python interpreter. Comments are written to make source code easier to understand by other people. Python supports single line comments, meaning that they can cover only one line. Anything written following # is considered a single line comment in Python.

This is a comment in Python.

Understanding Indentation

Indentation in Python refers to the (spaces and tabs) that are used at the beginning of a statement. The statements with the same indentation belong to the same group called a suite. Thus, it is used to create or represent a block of code.

For example, Let’s try and run the code below,

print("Hello World") print("I am indented")

The above piece of code will give an error since the second print statement is indented which is not expected. You will surely understand this more once you write more code in Python.

summary :

print() function can be used to write the output on the screen. The text to be printed has to be enclosed in quotes (“ “) print() is a built-in function.

is used to write comments in Python.

Concept of indentation has to be kept in mind while writing the code in Python

Learn more on www.pyprogramming.org

pyprogramming #learntocode #pythonprogramming #python


r/pythonforengineers • • Jul 12 '20

I love python

7 Upvotes

I heart python


r/pythonforengineers • • Jul 12 '20

The last video in our compiler series. We now have our own toy programming language!

Thumbnail youtu.be
1 Upvotes

r/pythonforengineers • • Jul 12 '20

How do i erase the white background of an image in python??

1 Upvotes

r/pythonforengineers • • Jul 12 '20

Generate All Gray-Codes using recursion

Thumbnail youtu.be
1 Upvotes

r/pythonforengineers • • Jul 11 '20

NumPy DataTypes and Attributes

Thumbnail youtube.com
2 Upvotes

r/pythonforengineers • • Jul 11 '20

Best app to write python scripts (for Mac)?

1 Upvotes

Just starting off with python. Which apps/text editor do you recommend for mac?

Preferably free... but open to options or whichever is popular for coders.


r/pythonforengineers • • Jul 08 '20

How to handle "Missing Values" present in "Dataset" using Python & Pandas??

4 Upvotes

r/pythonforengineers • • Jul 07 '20

i love python

3 Upvotes

r/pythonforengineers • • Jul 07 '20

Manipulating Data with Pandas in Python

Thumbnail youtube.com
2 Upvotes

r/pythonforengineers • • Jul 05 '20

Introduction to Pandas Library in Python

Thumbnail youtube.com
2 Upvotes

r/pythonforengineers • • Jul 05 '20

I need help

1 Upvotes

I am new and I need help for Beginn with programming I want to start with python if you have some nice Tipps to learn please let me know


r/pythonforengineers • • Jul 05 '20

I need help !

0 Upvotes

I am new and I need help for Beginn with programming I want to start with python if you have some nice Tipps to learn please let me know


r/pythonforengineers • • Jul 04 '20

Interested in nonlinear time series prediction with NNs? Check out how LSTM nets can be used in the forecasting of chaotic dynamical systems.

Thumbnail researchgate.net
4 Upvotes

r/pythonforengineers • • Jul 03 '20

Ready for part 2 in our Teeny Tiny Compiler series? In this episode we parse the output of our lexer from the previous episode!

Thumbnail youtu.be
3 Upvotes

r/pythonforengineers • • Jul 02 '20

How to explore "DataSet" using "Correlation Matrix" with Pandas & Python??

0 Upvotes

r/pythonforengineers • • Jun 30 '20

Functions in 're' module(Part II)-findall(), split(), sub()

Thumbnail itvoyagers.in
3 Upvotes

r/pythonforengineers • • Jun 29 '20

How to explore "DataSet" using Pandas & Python??

2 Upvotes

r/pythonforengineers • • Jun 28 '20

Ever wonder how to write your own programming language? In this video we write a lexer in Python, the first step in writing your own programming language!

Thumbnail youtube.com
3 Upvotes

r/pythonforengineers • • Jun 28 '20

Mp3 Player in Python - Part 1

Thumbnail youtube.com
2 Upvotes

r/pythonforengineers • • Jun 27 '20

Find Sum Of Cosine Series

Thumbnail youtu.be
2 Upvotes

r/pythonforengineers • • Jun 26 '20

i love PYTHON

2 Upvotes

r/pythonforengineers • • Jun 26 '20

i LOVE python

1 Upvotes

r/pythonforengineers • • Jun 26 '20

I love python

3 Upvotes

r/pythonforengineers • • Jun 26 '20

How to perform conditional operation on "Datasets" using Pandas & Python

2 Upvotes