{"id":3734,"date":"2023-03-01T18:39:44","date_gmt":"2023-03-01T23:39:44","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/?p=3734"},"modified":"2023-03-01T18:39:44","modified_gmt":"2023-03-01T23:39:44","slug":"blog-post-week-6a","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/2023\/03\/01\/blog-post-week-6a\/","title":{"rendered":"Blog Post Week 6(A)"},"content":{"rendered":"<div>\n<p class=\"q-text\">if- else statements are conditional statements or in another way you can make decisions based on these statements that which part of the code you will execute when your condition is true and which block of code you will execute when your condition is false. Use<span class=\"apple-converted-space\">\u00a0<\/span>if<span class=\"apple-converted-space\">\u00a0<\/span>to specify a block of code to be executed, if a specified condition is true. Use<span class=\"apple-converted-space\">\u00a0<\/span>else<span class=\"apple-converted-space\">\u00a0<\/span>to specify a block of code to be executed if the same condition is false. Use<span class=\"apple-converted-space\">\u00a0<\/span>else if<span class=\"apple-converted-space\">\u00a0<\/span>to specify a new condition to test, if the first condition is false. Use<span class=\"apple-converted-space\">\u00a0<\/span>switch<span class=\"apple-converted-space\">\u00a0<\/span>to select one of many blocks of code to be executed<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">Example<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">a=10<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">b=5<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">if a&gt;b:<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">print(\u201ca is greater\u201d)<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">else: print(\u201cb is greater\u201d)<\/p>\n<\/div>\n<div>\n<p class=\"q-text\">IsNaN is used to test if something is a number or not. It will return true if whatever is passed<span class=\"apple-converted-space\">. <\/span>Otherwise it returns false.<\/p>\n<ol>\n<li>log(isNaN(10)); \/\/ returns &#8220;false&#8221;\u00a0<\/li>\n<li>log(isNaN(&#8217;10&#8217;)); \/\/ still returns &#8220;false&#8221;\u00a0<\/li>\n<li>log(isNaN(&#8216;sample&#8217;)); \/\/ returns &#8220;true&#8221;\u00a0<\/li>\n<\/ol>\n<p style=\"font-weight: 400\">\u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>if- else statements are conditional statements or in another way you can make decisions based on these statements that which part of the code you will execute when your condition is true and which block of code you will execute when your condition is false. Use\u00a0if\u00a0to specify a block of code to be executed, if [&hellip;]<\/p>\n","protected":false},"author":26754,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[10531],"tags":[],"class_list":{"0":"post-3734","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-student-post","7":"entry"},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/users\/26754"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/comments?post=3734"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3734\/revisions"}],"predecessor-version":[{"id":3735,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3734\/revisions\/3735"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media?parent=3734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/categories?post=3734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/tags?post=3734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}