\n 1 min read <\/span>\n <\/p>\n This program includes the conditionals if<\/strong> and else<\/strong>. Basically, you establish a condition, if it’s true the program will do a series of actions you want it to do and, if it’s false, will do other series of actions determined by you. The way to write conditionals is like this:<\/p>\n if(condition)<\/p>\n {<\/p>\n series of actions if true<\/p>\n }<\/p>\n else<\/p>\n {<\/p>\n series of actions if false<\/p>\n }<\/p>\n <\/p>\n The program below asks the temperature in Farenheit, then it converts it to Celcius and finally it prints in the screen a text that says if the water boils or not, depending on the temperature the user introduced at the beginning.<\/p>\n <\/p>\n Here’s the program executed introducing two temperatures, 32 ºF (water does not boil at this temperature) and 212 ºF (water boils at this temperature).<\/p>\n <\/p>\n To complet this task, I consulted pages 33 and 34 of the book “How to think like a computer scientist” by Allen B. Downey.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" 1 min read <\/p>\n This program includes the conditionals if and else. Basically, you establish a condition, if it’s true the program will do a series of actions you want it to do and, if it’s false, will do other series of actions … Continue reading