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/feed-rss2.php on line 8
‘#Asks’ Articles at Courses by Ken https://kenscourses.com/tc101winter2015 Facilitator of Learning Experiences Wed, 28 Jan 2015 22:09:50 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ #TC1014 #WSQ03 https://kenscourses.com/tc101winter2015/2015/tc1014-wsq03/ Wed, 28 Jan 2015 22:09:50 +0000 http://gilrg18.withknown.com/2015/tc1014-wsq03

2 min read

Here's my code for the #WSQ03, i used these links as a reference to help me deal with this task: http://stackoverflow.com/questions/17651384/python-remove-division-decimal 

http://stackoverflow.com/questions/5584586/find-the-division-remainder-of-a-number

 I have put some comments in the code to explain what each line does.

num1 = int(input("Give me a number: ")) #Asks the user for a number

num2 = int(input ("Give me another number: ")) #Asks the user for another number

suma = num1+num2 #this is the variable for the sum of two numbers

resta= num1-num2  #this is the variable for the difference of two numbers

multi= num1*num2  #this ios the variable for the product of two numbers

div=num1/num2 #this is the variable for the division of two numbers

rem= num1%num2 #this is the variable for the remainder of the division of two numbers

print ("The sum of your numbers is", suma) #Shows the user the result of the sum

print ("The difference of your numbers is", resta) #Shows the user the result of the difference

print ("The product of your numbers is", multi) #Shows the user the result of the product

print ("The division of your numbers is", int(div)) #Shows the user the result of the division

print("The remainder of the division of your numbers is", int(rem)) #Shows the user the remainder of the division

I could have printed every result in one print function but i think it looks better this way. :) #TC1014 #WSQ03 
Continue reading →]]>

2 min read

Here’s my code for the #WSQ03, i used these links as a reference to help me deal with this task: http://stackoverflow.com/questions/17651384/python-remove-division-decimal 

http://stackoverflow.com/questions/5584586/find-the-division-remainder-of-a-number

 I have put some comments in the code to explain what each line does.

num1 = int(input(“Give me a number: “)) #Asks the user for a number

num2 = int(input (“Give me another number: “)) #Asks the user for another number

suma = num1+num2 #this is the variable for the sum of two numbers

resta= num1-num2  #this is the variable for the difference of two numbers

multi= num1*num2  #this ios the variable for the product of two numbers

div=num1/num2 #this is the variable for the division of two numbers

rem= num1%num2 #this is the variable for the remainder of the division of two numbers

print (“The sum of your numbers is”, suma) #Shows the user the result of the sum

print (“The difference of your numbers is”, resta) #Shows the user the result of the difference

print (“The product of your numbers is”, multi) #Shows the user the result of the product

print (“The division of your numbers is”, int(div)) #Shows the user the result of the division

print(“The remainder of the division of your numbers is”, int(rem)) #Shows the user the remainder of the division

I could have printed every result in one print function but i think it looks better this way. 🙂 #TC1014 #WSQ03 
]]>
https://creativecommons.org/licenses/by/4.0/