Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":5427,"date":"2015-02-18T23:07:47","date_gmt":"2015-02-19T05:07:47","guid":{"rendered":"http:\/\/gilrg18.withknown.com\/2015\/mastery11-calling-python-functions"},"modified":"2015-02-18T23:07:47","modified_gmt":"2015-02-19T05:07:47","slug":"mastery11-calling-python-functions","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/mastery11-calling-python-functions\/","title":{"rendered":"#mastery11 Calling python functions"},"content":{"rendered":"
\n

I used this link to help me do this mastery: https:\/<\/wbr>\/<\/wbr>docs.python.org\/<\/wbr>2\/<\/wbr>tutorial\/<\/wbr>controlflow.html#defining-functions<\/a><\/p>\n

It is also useful to read chapter 3 of the book “Think Python, How to Think Like a Computer Scientist”, <\/a><\/p>\n

You can see an example of this in my #WSQ08<\/a>. Here’s the code showing where i called the function that i defined:<\/p>\n

def osuma (num1,num2): #function<\/a> osuma<\/p>\n

suma=num1+num2<\/p>\n

return suma <\/p>\n

 <\/p>\n

def oresta (num1,num2): #function<\/a> oresta<\/p>\n

resta=num1-num2<\/p>\n

return resta<\/p>\n

 <\/p>\n

def omulti (num1,num2): #function<\/a> omulti<\/p>\n

multi=num1*num2<\/p>\n

return multi<\/p>\n

 <\/p>\n

def odiv (num1,num2): #function<\/a> odiv<\/p>\n

div=num1\/num2<\/p>\n

return div<\/p>\n

 <\/p>\n

def orem(num1,num2): #function<\/a> orem<\/p>\n

rem= num1%num2<\/p>\n

return rem<\/p>\n

 <\/p>\n

 <\/p>\n

num1 = int(input(“Give me a number: “)) <\/p>\n

num2 = int(input (“Give me another number: “))<\/p>\n

#Here<\/a> i called every function i defined in order for the variable to take the functions value<\/p>\n

su=osuma(num1,num2) #Here<\/a> i called osuma function i defined in order for the variable to take the function’s value<\/p>\n

res=oresta(num1,num2) #Here<\/a> i called oresta function i defined in order for the variable to take the function’s value<\/p>\n

mult=omulti(num1,num2) #Here<\/a> i called omulti function i defined in order for the variable to take the function’s value<\/p>\n

di=odiv(num1,num2) #Here<\/a> i called odiv function i defined in order for the variable to take the function’s value<\/p>\n

re=orem(num1,num2) #Here<\/a> i called orem function i defined in order for the variable to take the function’s value<\/p>\n

 <\/p>\n

print (“The sum of your numbers is”, su) <\/p>\n

print (“The difference of your numbers is”, res) <\/p>\n

print (“The product of your numbers is”, mult) <\/p>\n

print (“The division of your numbers is”, int(di)) <\/p>\n

print(“The remainder of the division of your numbers is”, int(re)) <\/p>\n

 <\/p>\n

#mastery11<\/a><\/p>\n

#TC1014<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

I used this link to help me do this mastery: https:\/\/docs.python.org\/2\/tutorial\/controlflow.html#defining-functionsIt is also useful to read chapter 3 of the book “Think Python, How to Think Like a Computer Scientist”,&nb… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,25],"tags":[144,295,280,185,128,45,233],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/5427"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=5427"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/5427\/revisions"}],"predecessor-version":[{"id":7429,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/5427\/revisions\/7429"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=5427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=5427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=5427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}