We’re so used to our regular numbers — 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 — that we forget we haven’t always had those. There were quite a few numeral systems in the history of mankind, but most of them are no longer in use. However, Roman numerals are still in (sort of) use, especially if you have a grandfather’s clock and want to know the time. 😁
Most of us have been taught how to read Roman numerals as kids and we do that almost instinctively. Here’s a primer how to read them:
Roman numerals are represented by seven different symbols:
Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000
For example, 2 is written as
II in Roman numeral — just two one's added together. 12 is written as
XII, which is
II. 27 is written as
XXVII, which is
Roman numerals are usually written largest to smallest from left to right. However, as numbers increase, at some point, it makes more sense to subtract the lower number from the larger number. For example, 9 is not
IX,40 is not
XV, etc. It’s easy to explain that to a fellow human, but how can we explain that to a machine? We need to write a fool-proof algorithm to do that!
First, let’s just translate Roman numerals to regular numbers in the order they appear. For example, XLVII would be 10, 50, 5, 1, 1. To do that we’ll use a for loop, and we’ll be checking if the current numeral in the string (s) is one of the Roman numerals. For example, if it’s
I, we’ll be adding 1 to the array of numbers that we created beforehand, and if it’s
X, we’ll be adding 10.
In this post, we are putting curated list of top tools with key features and download links "Top 19 Front End Web Development Tools to Consider in 2020"
Today I wanted to share with you the tools I daily use to increase my productivity as a front-end developer. 6 tools to increase your productivity as a Front-end developer.
In this article, I am going to talk about best practices to follow when structuring the project’s frontend architecture, writing front-end code, and preparing for deployment. Front-End Web Development Best Practices