Sometimes we need the feedback from the user and this is how we made by input(), if you don’t know how this is done please check the video below 😀 and learn how to validate what the users typed!!!
Here’s the video:
Sometimes we need the feedback from the user and this is how we made by input(), if you don’t know how this is done please check the video below 😀 and learn how to validate what the users typed!!!
Here’s the video:
Modules are a very strong and powerful thing inside Python3 if you don’t know how to make one or even how to using here’s a video of how you can do it:D
Here’s the video
If you don’t know how to make a tuple or a list I recommend you to see my video to learn how to
Here’s my video 😀
Learn how to create while and for i in and also see somes examples 😀
For i, are very use for things like fill things, create list, something that follows a pattern, also create loops
While are for things that change over the time like a user input, also it helps to validate things and create loops
If you have still doutbs please look this:
If and For in Reference in Python3 Official Source
Here is my video about dictionaries, learn how to create it
Dictionaries are very useful and powerful because it’s like link one thing to another, a person to a name, a name to a age, a age to a gender.
Dictionaries are mutable so you can add and erase things from it 😀
If you need more help you might look this:
Official Reference Dictionaries Python3
Mastery about how to use elif and else! watch it!
elif’s and else’s are very powerful and necessary, because most of the programs have if’s, if you have doubts or you are lost see my video below
You you need more help don’t hesitate to look this 😀
Python elif, else, if’s official reference
Hi this video will show you how to create and call functions inside Python3:
Hope enjoy! 🙂
If you need more help you might wanna see:
Hi everyone I’m going to let here my video about how to install Ubuntu in Virtual Machine.
Some important links:
Oracle Virtual Machine – https://www.virtualbox.org/wiki/Downloads
Ubuntu ISO Downlaod – http://www.ubuntu.com/download/desktop
Here’s the video:
Hi in Python 3 we have 6 Basic Types for categorize things, let me show you:
In Python 3 we have:
INTEGERS
We can say an ‘integer’ is an integer, some examples of this could be:
1, 23, 3909, -23, 4, -189
Unlike other programming languages python use Integers not matter how high or small it is as long as it is integer the type of the number will be INTEGER
With INTEGERS we can do many things, the basic could be math like:
>>>3+9
12
>>> 5-6
-1
But also INTEGERS can be used in the rest of the program, they are a essential part of Python, you have to be very attentive in do not confuse with string because 43 != ’43’.
Example of assign a INTEGER to a variable and assign a INTEGER of an input.
>>>num_Int = 3
#The first number is a variable that has the value of 3
>>>input_Int= int(input(‘Give me a number’))
#The second ask for the user to put a number and covert it to INTEGER
FLOAT
Float numbers are similar to integer just because they’re numbers too, but FLOAT allow you to use decimal numbers and this open a new world, because just imagine try to work with numbers like Ï€ or ‘e’ and use INTEGERS… it won’t work right?
As equal as INTEGER, FLOAT numbers can be used in mathematical operations.
>>>1.2+5.1
6.3
Also the float numbers can be also be assign to a variable or an input.
>>>num_Float = 3
#The first number is a variable that has the value of 3
>>>input_Float= int(input(‘Give me a number’))
#The second ask for the user to put a number and covert it to FLOAT
STRINGS
Strings are a very special type in Python because if you are familiar with other programming languages maybe you know that strings are not objects, but here in Python THEY ARE!
So you can use a string like a object and make a lot of things with it.
>example_string = ‘Hi everyone!’
>>>example_string
Hi everyone!
>>>len(example_string)Â Â Â Â Â Â Â Â Â Â Â #Length of the string
5
>>>type(example_string)Â Â Â Â Â Â Â Â Â #Type of the class
<class ‘str’>
Python String Official Reference
TUPLES
Tuples are a special type of ordered list in Python 3, because with Tuples you can make a list but you can’t modify it, it remains always the same.
To make a tuple the process is the following (very simple):
>>>example_Tuple = 1,2,3
>>>type(example_Tuple)
<class ‘tuple’>
To create a tuple just type the elements without any bracket or keys!
But why use tuples if they can’t be edited?
Well sometimes even if you don’t believe me Tuples are necessary just imagine for example that you are in charge of many schools of a region and you really don’t want to miss information, does a tuple can be useful?…
Of course because this way you secure the fact that any school name will be missed.
Python Tuples Official Reference
LISTS
List are amazing, as its name says it is a ordered list of things like Tuples but LIST CAN BE EDITED.
To make a list is very simple:
>>example_List = [1, 2, 3]
>>>type(example_List)
<class ‘list’>
#in Lists you can add [use list.append(x)]
>>>example_List.append(4)
>>>example_List
[1, 2, 3, 4]#in Lists you can remove [use list.remove(x) or list.pop(x)]
>>>example_List.remove(3)
>>>example_List
[1, 2, 4]#In Lists you can move elements inside and outside [use list.insert(x,y)]
>>>example_List.insert(2,3) #In second space insert number 3
>>>example_List
[1, 2, 3, 4]
Lists are very useful when you know how to use it, because it can help you with stacks and also when you are open a file in Python
Python3 Lists Official Reference
DICTIONARIES
Dictionaries are a link between anything and anything, they are very useful because it keep order the information, and provides different uses.
To make a dictionary follow the following example:
>>family_Age = {‘Me’:18, ‘Sister’:24, ‘Mom’:50, ‘Dad’:55}
>>>type(family_Age)
<class ‘dict’>#If you call a specific element it return the value
>>>family_Age[‘Mom’]50#You can add elements very simple
>>>family_Age[‘Uncle’]=47
>>>family_Age
{‘Me’:18, ‘Sister’:24, ‘Mom’:50, ‘Dad’:55, ‘Uncle’:47}#Also delete
>>>del family_Age[‘Me’]
>>>family_Age
{‘Sister’:24, ‘Mom’:50, ‘Dad’:55, ‘Uncle’:47}
Dictionaries are very useful for several things, if you want to know more about click the following link.
Here´s my Quiz 11, I have a little doubts in the first one but I can finally understand what it means 😀
Here’s my code:
https://github.com/cesarau04/WSQ/blob/master/Quiz%2311-problem1.py
https://github.com/cesarau04/WSQ/blob/master/Quiz%2311-problem2.py