For the creation of libraries you have to write them inside «{}», and here is a little example: This is my own dictionary, you just have to assign integers to your library. That’s all for my semestre with Ken, may Harambe be with you
Categoría: Sin categoría
Harambe and ranges
There are two ways in which you can use ranges in python: 1st. You’ll just simply write x = range(10) print(x) And it will print all number that goes from 0 to 10. 2nd. You write almost the same thing but: x = range(0,10,2) print(x) This means that the range for x will start in… Continúa leyendo Harambe and ranges
Reading and writing of .txt files
This is a very easy topic, we only need 2 things, a file .txt, and to know the «modes» in which you can open/use the file. These are the ways in which you can use the .txt files: «r» = To read «w» = For writing «a» = For appending Knowing now this, in your… Continúa leyendo Reading and writing of .txt files
Validated users
The main points of this topics, it is to use the functions «try», «except» and «else», and the propourse of this, is to make our program perfect, meaning that it will no crash. We can the user whatever we want, and as long as he answers right, the program will continue. This is an example:… Continúa leyendo Validated users
Creation of strings
A string is a sentence that you’ll use in several times, and it is so easy to use, and you’ll use it everytime you make a program. This is an example: And that’s it! When you run the program you’ll get your string Gg ezpz
Lists & Tuples
This is a very easy topic and I’ll explain it in a very easy way. To identify a list and a tuple just look at this example: A tuple can be write withouth the «[» «]», and also you can use «(» «)», so it is the same if you write: x = 1,2,3,4 or… Continúa leyendo Lists & Tuples
This one’s FOR you
This post will go straight to the point , so watch out, lads. For getting started, you’ll need first to state a list for «For» From that list you can print the numbers in it, also whenever you print a number, you can print other Strings, but they have to be inside of it too.… Continúa leyendo This one’s FOR you
Python 3: Back to basics
In python 3 we have 5 main basic types, which are: Booleans, numbers, integers, floats and fractions; which I’ll explain: Booleans: Tells us if something is true or false Numbers: Like the name say this variable let us save numbers Integers: Only whole numbers (1,2,3,87108) Floats: Numbers with decimals (1.1, 1.4831,24384.0053) Fractions: (½, 412/30) … Continúa leyendo Python 3: Back to basics
Eel-if, Else
HELPFUL VIDEO: https://www.youtube.com/watch?v=42MBMSOZgD4
Modules and Libraries/Calling Functions
Python 3 have so many libraries that you can use when you need them, and you just need to call for them in your program, and in this post I’ll give an example with «math» because is the easiest one (lol). To make use of the math library you just need to «call» for it:… Continúa leyendo Modules and Libraries/Calling Functions