{"id":534,"date":"2016-09-12T16:37:03","date_gmt":"2016-09-12T08:37:03","guid":{"rendered":"https:\/\/eligiblestore.com\/blog\/?p=534"},"modified":"2020-06-30T21:32:00","modified_gmt":"2020-06-30T13:32:00","slug":"kompas-developer-test","status":"publish","type":"post","link":"https:\/\/eligiblestore.com\/blog\/2016\/09\/12\/kompas-developer-test\/","title":{"rendered":"Kompas developer test"},"content":{"rendered":"<p>Sy dapat share dari group tentang lowongan kompas sebagai berikut:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"536\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2016\/09\/12\/kompas-developer-test\/lowongan-kompas-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?fit=1075%2C1083&amp;ssl=1\" data-orig-size=\"1075,1083\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"lowongan-kompas\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?fit=1016%2C1024&amp;ssl=1\" class=\"aligncenter wp-image-536 size-large\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?resize=1016%2C1024&#038;ssl=1\" alt=\"lowongan-kompas\" width=\"1016\" height=\"1024\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?resize=1016%2C1024&amp;ssl=1 1016w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?resize=298%2C300&amp;ssl=1 298w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?resize=768%2C774&amp;ssl=1 768w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/lowongan-kompas-1.jpg?w=1075&amp;ssl=1 1075w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/a><\/p>\n<p>Berikut adalah coding python yang saya gunakan jika ada code yang lebih efisien mohon diinfo<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport sys\r\n''' Code by David B '''\r\ntry:\r\n    if len(sys.argv) &lt; 2:\r\n        stars = int(input(&quot;How many stars? &quot;))\r\n    else:\r\n        stars = int(sys.argv&#x5B;1])\r\nexcept Exception:\r\n    print (&quot;Error: Only accepting Integer&quot;)\r\n    exit()\r\n\r\nfor x in range(stars,stars*-1,-1):\r\n    if (x % 2 != 0 and x &gt; 1):\r\n        for z in range(x,stars, 2):\r\n            print(' ', end=&quot;&quot;, flush=True)\r\n        for y in range(x,0,-1):\r\n            print('*', end=&quot;&quot;, flush=True)\r\n        if (x &gt; 1):\r\n            print('')\r\n    elif (x % 2 == 0 and x &lt;= 0):\r\n        for z in range(0,stars+x-1, 2):\r\n            print(' ', end=&quot;&quot;, flush=True)\r\n        for y in range(0,abs(x-1)):\r\n            print('*', end=&quot;&quot;, flush=True)\r\n        print('')\r\n<\/pre>\n<p>Berikut adalah contoh dari output:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/hasil.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"539\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2016\/09\/12\/kompas-developer-test\/hasil\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/hasil.jpg?fit=379%2C602&amp;ssl=1\" data-orig-size=\"379,602\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;A David L Batu&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1473698464&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"hasil\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/hasil.jpg?fit=379%2C602&amp;ssl=1\" class=\"aligncenter size-full wp-image-539\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/hasil.jpg?resize=379%2C602&#038;ssl=1\" alt=\"hasil\" width=\"379\" height=\"602\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/hasil.jpg?w=379&amp;ssl=1 379w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/hasil.jpg?resize=189%2C300&amp;ssl=1 189w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sy dapat share dari group tentang lowongan kompas sebagai berikut: Berikut adalah coding python yang saya gunakan jika ada code yang lebih efisien mohon diinfo import sys &#8221;&#8217; Code by David B &#8221;&#8217; try: if len(sys.argv) &lt; 2: stars = int(input(&quot;How many stars? &quot;)) else: stars = int(sys.argv&#x5B;1]) except Exception: print (&quot;Error: Only accepting Integer&quot;) [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":524,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[9],"tags":[],"class_list":["post-534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-database"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8pg5H-8C","jetpack-related-posts":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2016\/09\/python.jpg?fit=1440%2C900&ssl=1","_links":{"self":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts\/534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/comments?post=534"}],"version-history":[{"count":1,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts\/534\/revisions"}],"predecessor-version":[{"id":1263,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts\/534\/revisions\/1263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/media\/524"}],"wp:attachment":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/media?parent=534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/categories?post=534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/tags?post=534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}