Nesting of conditional statements

--Originally published at Luis Santana's Blog

This is me right now hehe. giphy

Now, talking about Python and programming. There will be times where you may want to check a condition after another condition solves for true, this means that inside an “if” condition you can have another “if” condition and several “elif” conditions too. You can use this tool to make your code easier to understand and help you finish earlier.

Here you can see an example:

nesting

You can check this link I used to get my information:

https://www.tutorialspoint.com/python/nested_if_statements_in_python.htm


Creation of sytrings and how to use them

--Originally published at Luis Santana's Blog

This blog is really special to me, and I would like to take a minute to explain it why. This post means that I’m half way there and just missing four posts.

2002

In this post I will talk about strings and how to create them. In order to create a string you should enclose your text in quotes, (it is the same if you use single quotes or double quotes). You can see an example below:

string

Check this link if you want to learn more about strings: https://www.tutorialspoint.com/python/python_strings.htm

 


Run a Python file from command line

--Originally published at Luis Santana's Blog

Well, I’m new at this of programming. The first thing I investigated and learned about was something related to Windows Prompt, but then my teacher told me that I should be using Cygwin and I started my research again.

What I did first was opening Atom and writing the usual “Hello World”

Then the next question was, how to open my “Hello World” from the command line?

This was a little bit confusing, first I tried with Windows Prompt, but when I installed Python 3 on my computer I didn’t pay attention where I saved my Python and I didn’t find it. I tried with Cygwin and with my teacher’s help I was able to do it. Imagen2

And that’s how I opened a Python file from the command line.