{"id":1298,"date":"2024-12-27T14:54:41","date_gmt":"2024-12-27T13:54:41","guid":{"rendered":"https:\/\/vroamam.com\/wordpress\/?p=1298"},"modified":"2024-12-27T14:54:41","modified_gmt":"2024-12-27T13:54:41","slug":"day-2-understanding-data-types","status":"publish","type":"post","link":"https:\/\/vroamam.com\/wordpress\/blog\/day-2-understanding-data-types\/","title":{"rendered":"Day 2 &#8211; Understanding Data Types"},"content":{"rendered":"\n<p>Day 2 itinerary:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Day 2 Goals<\/li>\n\n\n\n<li>Primitive Data Types\n<ul class=\"wp-block-list\">\n<li>Type Error<\/li>\n\n\n\n<li>Type Checking<\/li>\n\n\n\n<li>Type Conversion<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Mathematical Operators in Python<\/li>\n\n\n\n<li>Coding Exercise: BMI Calculator<\/li>\n\n\n\n<li>Number Manipulation and F Strings in Python<\/li>\n\n\n\n<li>Project: Tip Calculator<\/li>\n<\/ul>\n\n\n\n<p>Here is my BMI Calculator<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># The values are hard coded because Udemy won't allow inputs\n# also we havent discussed inputs yet\n\nheight = 1.65 \nweight = 84\n\n# Calculate the bmi using weight and height.\nbmi = weight \/ height ** 2\n\nprint(bmi)<\/code><\/pre>\n\n\n\n<p>Here is my Tip Calculator<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(\"Welcome to the tip calculator!\")\nbill = float(input(\"What was the total bill? $\"))\ntip = int(input(\"What percentage tip would you like to give? 10 12 15 \"))\npeople = int(input(\"How many people to split the bill? \"))\n\ntotal_bill = bill + (bill * (tip \/ 100))\nbill_per_person = total_bill \/ people\nfinal_amount = round(bill_per_person, 2)\nprint(f\"Each person should pay: ${final_amount}\")<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Day 2 itinerary: Here is my BMI Calculator Here is my Tip Calculator<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[144,148,3],"tags":[146,145,11],"class_list":["post-1298","post","type-post","status-publish","format-standard","hentry","category-100daysofcode","category-python","category-training","tag-100daysofcode","tag-python","tag-training","entry"],"_links":{"self":[{"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/posts\/1298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1298"}],"version-history":[{"count":1,"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/posts\/1298\/revisions"}],"predecessor-version":[{"id":1299,"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/posts\/1298\/revisions\/1299"}],"wp:attachment":[{"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vroamam.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}