{"id":30,"date":"2023-12-18T15:05:10","date_gmt":"2023-12-18T15:05:10","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/a_carpenter\/?p=30"},"modified":"2023-12-18T15:05:10","modified_gmt":"2023-12-18T15:05:10","slug":"numbers-that-are-divisible-by-3","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/a_carpenter\/2023\/12\/18\/numbers-that-are-divisible-by-3\/","title":{"rendered":"Numbers that are divisible by 3."},"content":{"rendered":"\n<p>x = int(input(&#8220;How many numbers do you need to check? &#8220;))<br>d3 = 0<br>nd3 = 0<br>for i in range(x):<br>&nbsp;&nbsp;&nbsp; number = int(input(&#8220;Enter number: &#8220;))<br>&nbsp;&nbsp;&nbsp; check = number % 3<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; if check == 0:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(f&#8221;{number} is divisible by 3.&#8221;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d3 += 1<br><br>&nbsp;&nbsp;&nbsp; else:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(f&#8221;{number} is not divisible by 3.&#8221;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nd3 += 1<\/p>\n\n\n\n<p>print(f&#8221;You entered {d3} number(s) that are divisible by 3.&#8221;)<\/p>\n\n\n\n<p>print(f&#8221;You entered {nd3} number(s) that are not divisible by 3.&#8221;)<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<p> <\/p>\n\n\n\n<p><a href=\"https:\/\/theroyalscode.com\/students\/a_carpenter\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Home Page<\/mark><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>x = int(input(&#8220;How many numbers do you need to check? &#8220;))d3 = 0nd3 = 0for i in range(x):&nbsp;&nbsp;&nbsp; number = int(input(&#8220;Enter number: &#8220;))&nbsp;&nbsp;&nbsp; check = number % 3 &nbsp;&nbsp;&nbsp; if check == 0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(f&#8221;{number} is divisible by 3.&#8221;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d3 += 1 &nbsp;&nbsp;&nbsp; else:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(f&#8221;{number} is not divisible by 3.&#8221;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nd3 += 1 print(f&#8221;You entered {d3} [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/posts\/30\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_carpenter\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}