Given a string, write a python function to check if it is palindrome or not. A palindrome is a word or number that is the same forwards or backwards such as racecar and 7117
def palindrome(num): return num == num[::-1] This is just one way to do it. In programming, there is never just one way to do something. In my function I have us input a number where it is seeing if the number is equal to itself backward. Python has a special way of doing this with the double colons. it then returns the number.
If a language is synchronous it means it will have to run and finish each line before it may move on to the the next. with asynchronous you dont have to wait for each part of the code to be finished before moving on. so a part that is below an above part can run if the code above it has not finished yet.
When we were kids we use to make paper machete volcanoes and got them to erupt by adding two common ingredients. Baking soda (sodium bicarbonate) and vinegar (acetic acid). explain what occurs when you add these two ingredients together and why.
When sodium bicarbonate and acetic acid are added together we will see it begin to foam very rapidly and release a lot of gas. What is occurring here is when the two ingredients react with each other they will form new compounds which are sodium acetate, carbon dioxide, and water. the reaction causes it to fizz because of the carbon dioxide trying to escape quickly. CH3COOH + NaHCO3 = CH3COONa + CO2 + H2O.