# Friday June 30th

## Happy Asteroid Day! (June 30th)

• Today is Asteroid Day.

• Tomorrow is 7/1/17…a Palindrome! Also..a concatenation of two primes!

## Katas

• Swap values
``````def swap(a, b):
temp = a
a = b
b = temp
return a, b
``````

## Jacob calculate time

• Unless the traffic speed is less than his time, calc dist as his dist / time
``````function trafficJam(trafficSpeed, jacobSpeed, dist){
if (trafficSpeed < jacobSpeed){
return dist / trafficSpeed;
}
else{
return dist / jacobSpeed;
}
}
``````

• It’s passing the kata in terms of the answer, but not the format :(
``````import math

try:
quad = ((b * (-1)) + (math.sqrt((math.pow(b, 2)) - (4 * a * c)))) / (2 * a)
quad1 = ((b * (-1)) - (math.sqrt((math.pow(b, 2)) - (4 * a * c)))) / (2 * a)
arr = []
else:
except:
return "No real solution"
return
``````

## Who will build the wall?

• Ah…another kata trashing the President. How original…easy points.
``````function whoIsPaying(name){
var arr = [];
if (name.length <= 2){
arr.push(name)
return arr;
}
else{
var trunc = name.substring(0,2);
arr.push(name)
arr.push(trunc)
return arr;
}
}
``````

## Capitalize first letter in String

``````function capitalizeWord(word) {
return word.charAt(0).toUpperCase() + word.slice(1);
}
``````

## Things to do

• Finish Udacity Week Two (Sunday/ Monday/ Tuesday ) (due on July 14th)

## Interested in learning more about

• Herbrand’s Theorem

• Conal Elliott’s “Teaching New Tricks to Old Programs” from YOW! Conferences. This contains a bit of what he spoke about in the Haskell talk we saw in the Bay in ‘16.