I've started the #100DaysOfCode challenge! I'll be updating here and on my twitter - jarry90. It may not be daily, but I'll be focusing on Python, Django, JS and maybe more. Randomly, today I followed @ania_kubow's flight widget tutorial.
Starting strong, but more of an admin and planning day today. Updated my GitHub profile, added my flight widget to GitHub and started planning my personal website which will be built on Django and hosted on AWS Elastic Beanstalk? or Lightsail?
Had a busy day at work and looking after the kids. Still managed to get in a quick JavaScript tutorial and looked into some interesting APIs on Public APIs. The Owen Wilson wow API has inspired me! I might try making a FRIENDS related API
I went away with the family, so I took the weekend off. Today I created this repository and readme for my #100DaysOfCode log. I also researched my FRIENDS API. And stated Roman Numerals Decoder kata at Codewars. I need to work out how roman numerals work ๐ค. I've been slack, but am getting real tomorrow!
I continued the roman numeral decoder kata in python... haven't fully worked out roman numerals yet - will finish tomorrow.
I watched a few YouTube videos;
Make MEMORY GAME in JavaScript, HTML and CSS for your portfolio
Have you done these 4 THINGS?? - Getting a job as a Software Developer
My plan to hit it hard has failed, but something is something. Hopefully get more done tomorrow!
I finally had a proper chunk to time to think about this. I finally worked out how roman numerals work - if the letter value is more than the next letter you add the value to the total, and if its less than the next, you subtract it.
Here is the solution I came up with.
def solution(roman):
nums = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
number = 0
for ref, letter in enumerate(roman):
try:
if nums[letter] < nums[roman[ref+1]]:
number = number - nums[letter]
else:
number = number + nums[letter]
except IndexError:
number = number + nums[letter]
return number
Looking at the other solutions on codewars.com I'm actually thinking this is a more elegent solution than most. So I'm happy :)