Strings

--Originally published at Python

Creating and using strings is simple. You just need to define a variable  using an apostrophe. Ex: string1 = ‘Hello’

After this, you can play around with the string. You can update it, print all of it, print only some parts, etc. Here are some examples:

Code:

str1 = ‘I like dogs’

print(str1)
print(str1[0])
print(str1[7:10])

2strings

As you can see, it’s easy, you just need to understand the positioning and how everything inside of it is arranged.


Repetition

--Originally published at Python

In this post I will be talking about repetition in Python 3 and when you should use which type of repetition. As we already know (or should) the 2 types of repetition we have are “while” and “for”. They are different but follow the same idea, a process is repeated depending on what you want to achieve.

While is better used when you don’t know the number of times a process will be repeated. That’s why you just state a condition and expect it to be false at some point in time, that’s when it will stop and you will get your result from it.

For is used when you have a List or a Tuple. We know how many times a process will be repeated because we know the number of variables inside of the list or tuple used. So the final answer here will depend on the number of variables you have stored, not on a condition given to the program.

In conclusion, use While when you want a loop to repeat infinitely until a certain condition is false, use For when you have a list or a Tuple and you want a process to be repeated according to the number of variables you have in them and their value. If you want another explanation and easy to follow examples, click here.


Programación Ágil

--Originally published at Python

Investigué acerca de la programación ágil para el proyecto de introducción a la carrera. Aquí esta lo que escribí espero que les sirva de algo saber esto y que investiguen más al respecto.

agil

Programación Ágil

A lo largo de nuestras carreras nos vamos dando cuenta cuáles recursos son los que más nos sirven y cuáles no son tan importantes. Uno de los que más nos ayudará vendría siendo la programación ágil. La programación ágil se refiere a unas metodologías que, en teoría, nos ayudan al momento de desarrollar software. Hay varias metodologías que son parte de esto, pero todas siguen la misma base. Se podría decir que todas buscan darle mayor comodidad al individuo para así mejorar la calidad en la producción del software. Por ejemplo, una de sus ideas sería construir un buen equipo y que, a partir de eso, puedan crear un entorno donde se sientan todos mejor. La idea es evitar lo opuesto a esto, que sería crear un entorno y obligar a un equipo a adaptarse a este. Esto solo le trae problemas al equipo y muchas veces terminan trabajando no les permite sacar su máximo potencial. Otra idea muy importante que tratan de seguir es que importa más que un programa funcione a que se tenga buena documentación. Todo lo que hagas debería mantenerse conciso, así evitamos documentos innecesarios que gasta espacio y tiempo. La tercera idea fundamental que siguen dice que la colaboración entre el equipo y el cliente muy importante. Lo mejor sería que el equipo se mantenga en contacto con su cliente, así se puede ver mejor el progreso que llevan y cómo pueden mejorar. La última idea sería que se debe poder responder a los cambios en el proyecto. Si tratamos de siempre seguir un plan y seguir reglas al pie

Continue reading "Programación Ágil"

Comments

--Originally published at Python

Code:
print(“This program just shows comments and how they affect the program.”)
#3
print(“As you can see, comments are only visible inside the code, they aren’t shown when the program runs. Otherwise, you’d see a 3 above this message.”)
#I shouldn’t be writing this much
print(“Comments help you understand what you are seeing in case the code was written by someone else. They can also help you remember what you were doing, in case you closed the program and decided to open it again some time later.”)
#Bye
Comments