{"id":27888,"date":"2016-01-25T18:37:21","date_gmt":"2016-01-26T00:37:21","guid":{"rendered":"http:\/\/alextenablog.wordpress.com\/?p=77"},"modified":"2016-01-25T18:50:21","modified_gmt":"2016-01-26T00:50:21","slug":"wsq03-4","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/01\/wsq03-4\/","title":{"rendered":"#WSQ03"},"content":{"rendered":"<p><strong>This assisgment was a little bit trickier than the previous one, but still is fairly simple. All I needed to do is to ask the user to type 2 numbers and then make 4 different operations with such numbers.<\/strong><\/p>\n<p><strong>For knowing how to write this code I\u00a0again read some parts of the &#8220;Think Python&#8221; book.<\/strong><\/p>\n<p><em><strong><a href=\"http:\/\/www.greenteapress.com\/thinkpython\/thinkpython.pdf\" rel=\"nofollow\">http:\/\/www.greenteapress.com\/thinkpython\/thinkpython.pdf<\/a><\/strong><\/em><\/p>\n<p><strong>I had a doubt about how to do the integer division so I searched online for the answer and this web page gave me the solution.<\/strong><\/p>\n<p><em><strong><a href=\"http:\/\/stackoverflow.com\/questions\/183853\/in-python-what-is-the-difference-between-and-when-used-for-division\" rel=\"nofollow\">http:\/\/stackoverflow.com\/questions\/183853\/in-python-what-is-the-difference-between-and-when-used-for-division<\/a><\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Here is my final code:<\/strong><\/p>\n<p><strong>print (&#8220;This program will do some operations with 2 numbers you choose&#8221;)<\/strong><br \/>\n<strong> print (&#8220;Type a number&#8221;)<\/strong><br \/>\n<strong> num1=input ()<\/strong><br \/>\n<strong> print (&#8220;Now type another number&#8221;)<\/strong><br \/>\n<strong> num2=input ()<\/strong><br \/>\n<strong> sub=int(num1) &#8211; int (num2)<\/strong><br \/>\n<strong> multi= int(num1) * int (num2)<\/strong><br \/>\n<strong> div= int(num1) \/\/ int (num2)<\/strong><br \/>\n<strong> rem= int(num1) % int (num2)<\/strong><br \/>\n<strong> print(&#8220;The difference of those numbers is&#8221;, sub)<\/strong><br \/>\n<strong> print(&#8220;The product of those numbers is&#8221;, multi)<\/strong><br \/>\n<strong> print(&#8220;The division of those numbers is&#8221;, div)<\/strong><br \/>\n<strong> print(&#8220;The remainder of the division of those numbers is&#8221;, rem)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>And this is the program:<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-101\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/01\/59dfa08b595fbfc6dcc6f0de5c1e7f6c.jpg\" alt=\"numbers\"   \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-97\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/01\/eba8a6a7fdff9d8c7626d937a2c5a0fb.jpg#038;h=386\" alt=\"numbers2\" width=\"717\" height=\"386\" \/><\/p>\n<p><a href=\"http:\/\/www.greenteapress.com\/thinkpython\/thinkpython.pdf\" rel=\"nofollow\">http:\/\/www.greenteapress.com\/thinkpython\/thinkpython.pdf<\/a><\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/alextenablog.wordpress.com\/77\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/01\/090f44c2b27deee1275d2cfdd406dc22.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/01\/6c8923a4380ba871e552de432c072e7a.jpg#038;blog=105328326&#038;%23038;post=77&#038;%23038;subd=alextenablog&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This assisgment was a little bit trickier than the previous one, but still is fairly simple. All I needed to do is to ask the user to type 2 numbers and then make 4 different operations with such numbers. For knowing how to write this code I\u00a0again read some parts of the &#8220;Think Python&#8221; book. &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/01\/wsq03-4\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">#WSQ03<\/span><\/a><\/p>\n","protected":false},"author":46,"featured_media":27890,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[73,45],"class_list":["post-27888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-wsq03","tag-sin-categoria"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/27888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=27888"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/27888\/revisions"}],"predecessor-version":[{"id":27897,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/27888\/revisions\/27897"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/27890"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=27888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=27888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=27888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}