Notes and learnings from Kaggle (Intro to Programming)
Intro to programming Arithmetic and Variables Shift + Enter to run a code removing # sign is called uncommenting print("Hello, world") print(1+2) print(3**2) print(((1 + 3) * (9 - 2) / 2) ** 2) #Multiply 3 by 2 print(3*2) Multiply 3 by 2 #create test_var and give value test_var = 4+5 #print the value print(test_var) # set the value 3 my_var = 3 #print the value my_var print(my_var) #Set the new value 100 my_var = 100 #print the new my_var print(my_var) print(my_var) print(test_var) my_var = my_var + 3 #Increase value by 3 my_var = my_var + 3 #print the increased value print(my_var) num_years = 4 days_per_year = 365 hours_per_day = 24 seconds_per_hour = 60 secs_per_year = 60 #Calculate umber of seconds of 4 year total_secs = secs_per_year * seconds_per_hour * hours_per_day * days_per_year * num_years #print result print(total_secs) num_years = 4 days_per_year = 365 hours_per_day = 24 seconds_per_hour = 60 secs_per_year = 60 #update the days per year days_per_year = 365.25 #C...