-
Recent Posts
Recent Comments
Archives
Categories
Meta
Tag Archives: #WSQ08
Wsq 08
What to do:
i’m taking the same instructions as Wsq 03
But this time i’m using functions!, with the help of this video made by Ken:
Link to my Dropbox code:
Comments Off on Wsq 08
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ08, FlippedClassroom, Programming, Python
Wsq 08
On to Functions
What to do:
i’m taking the same instructions as Wsq 03
But this time i’m using functions!, with the help of this video made by Ken:
Link to my Dropbox code:
Comments Off on Wsq 08
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ08, FlippedClassroom, Programming, Python
WSQ_08: Sum of Numbers…again ¬¬
Comments Off on WSQ_08: Sum of Numbers…again ¬¬
Posted in Blogs, Syndicated, TC1014 Blogs
On To Functions #WSQ08 #TC1014
In this activity we had to do the same as the “Fun with numbers” WQS but in this case, we had to use functions instead of simply printing the results.
First we have to introduce ourselves into the Functions usage, personally I found it easy to understand reading this article: http:/
Then we have to do the same prosses as before in the WSQ03, I explained it well in my code so here it is.
Code: https:/
Antonio Yosefat Juárez Quintero
A01228128
Comments Off on On To Functions #WSQ08 #TC1014
Posted in Blogs, Syndicated, TC1014 Blogs
#mastery12 Creating python functions
I used this link to help me do this mastery: https:/
It is also useful to read chapter 3 of the book “Think Python, How to Think Like a Computer Scientist”,
You can see an example of this in my #WSQ08. Here’s the code showing the function that i created
def osuma (num1,num2): #first you have to define your function, in this case it’s osuma with num1 and num 2 as parameters
suma=num1+num2 #This is what the function does… this line must be idented so the function can work properly
return suma #the return statement returns with a value from a function… this line must be idented so the function can work properly
num1 = int(input(“Give me a number: “))
num2 = int(input (“Give me another number: “))
su=osuma(num1,num2) #Here i called osuma function i defined in order for the variable to take the function’s value
print (“The sum of your numbers is”, su)
Comments Off on #mastery12 Creating python functions
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #333333, #defining, #first, #here, #mastery12, #TC1014, #the, #this, #WSQ08
#mastery11 Calling python functions
I used this link to help me do this mastery: https:/
It is also useful to read chapter 3 of the book “Think Python, How to Think Like a Computer Scientist”,
You can see an example of this in my #WSQ08. Here’s the code showing where i called the function that i defined:
def osuma (num1,num2): #function osuma
suma=num1+num2
return suma
def oresta (num1,num2): #function oresta
resta=num1-num2
return resta
def omulti (num1,num2): #function omulti
multi=num1*num2
return multi
def odiv (num1,num2): #function odiv
div=num1/num2
return div
def orem(num1,num2): #function orem
rem= num1%num2
return rem
num1 = int(input(“Give me a number: “))
num2 = int(input (“Give me another number: “))
#Here i called every function i defined in order for the variable to take the functions value
su=osuma(num1,num2) #Here i called osuma function i defined in order for the variable to take the function’s value
res=oresta(num1,num2) #Here i called oresta function i defined in order for the variable to take the function’s value
mult=omulti(num1,num2) #Here i called omulti function i defined in order for the variable to take the function’s value
di=odiv(num1,num2) #Here i called odiv function i defined in order for the variable to take the function’s value
re=orem(num1,num2) #Here i called orem function i defined in order for the variable to take the function’s value
print (“The sum of your numbers is”, su)
print (“The difference of your numbers is”, res)
print (“The product of your numbers is”, mult)
print (“The division of your numbers is”, int(di))
print(“The remainder of the division of your numbers is”, int(re))
Comments Off on #mastery11 Calling python functions
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #333333, #defining, #function, #here, #mastery11, #TC1014, #WSQ08
#TC1014 #WSQ08 On to functions
For this WSQ i had to read chapter 3 of the book ” “Think Python, How to Think Like a Computer Scientist” which explained how to make functions.
Here’s my code:
#GILBERTO ROGEL GARCÍA A01630171
def osuma (num1,num2):
suma=num1+num2 #this line must be idented in order for the function to work properly.
return suma #this line must be idented in order for the function to work properly.
def oresta (num1,num2):
resta=num1-num2 #this line must be idented in order for the function to work properly.
return resta #this line must be idented in order for the function to work properly.
def omulti (num1,num2):
multi=num1*num2 #this line must be idented in order for the function to work properly.
return multi #this line must be idented in order for the function to work properly.
def odiv (num1,num2):
div=num1/num2
return div
def orem(num1,num2):
rem= num1%num2 #this line must be idented in order for the function to work properly.
return rem #this line must be idented in order for the function to work properly.
num1 = int(input(“Give me a number: “))
num2 = int(input (“Give me another number: “))
su=osuma(num1,num2)
res=oresta(num1,num2)
mult=omulti(num1,num2)
di=odiv(num1,num2)
re=orem(num1,num2)
print (“The sum of your numbers is”, su)
print (“The difference of your numbers is”, res)
print (“The product of your numbers is”, mult)
print (“The division of your numbers is”, int(di))
print(“The remainder of the division of your numbers is”, int(re))
Comments Off on #TC1014 #WSQ08 On to functions
Posted in Blogs, Syndicated, TC1014 Blogs