255 255 255 Value Test Code We Can
Calculate the differences between this colour and each of the 12 colours of the above colour wheel, ask the user to input an RGB colour code, For instance the picture above represents a colour wheel that includes 12 colours: RED (Hex: #FF0000 – RGB: 255, 0, 0)CHARTREUSE GREEN (Hex: #7FFF00 – RGB: 127, 255, 0)SPRING GREEN (Hex: #00FF7F – RGB: 0, 255, 127)MAGENTA (Hex: #FF00FF – RGB: 255, 0, 255)The colour difference formula is used to find out the “distance” between two colours:We can use this formula to find out if two colours are very close (small difference).For this challenge, your task is to write a Python script that will: These numbers are 255, 254, 252, 248, 240, 224, 192, and 128.Check the following RGB Color picker to see how RGB codes work:Using the RGB colour code we can represent 256 3 = 16,777,216 colours.A colour wheel is used to represent some of the most distinct colours. output the name of the closest colour from the colour wheel. For instance the RGB code for:Takes three integer numbers, representing the red, green and blue values of an RGB color, each within range 0255 Returns the same color in hexadecimal.Solution: A Class B network ID with a /22 mask is 255.255.252.0, with a block size of 4 in the third octet. The network address in the question is in subnet 172.16.16.0 with a broadcast address of 172.16.19.255.
When you are doneWith this tutorial, these questions will be no harder than simple addition or subtraction.To put this is real life terms, suppose the CCNA exam has 50 questions and you are givenAround 20 subnetting questions. For example, some haveEstimated that the CCNA exam has around 40% subnetting questions. In addition, the mastery of these conceptsWill give you a major advantage when you sit for the exam. This training session will teachYou everything you need to know to pass any exam that requires TCP/IP knowledge.In addition, the methods you will learn here will allow you to not only solve subnettingQuestions, it will help you increase your speed and master TCP/IP concepts.For many entry-level to intermediate computer networking exams, the need to quicklySolve subnet based questions is apparent.
If you were going to send a letter (or in this case email) to anotherIP address, your router will decide what to do with that message.If you put the outgoing letter by your mail box, a few things would happen based on the destination postal address (IP Address).If the letter was being mailed to someone in your own building, the router or postal carrier (switch) would know that it does not have to leave the building (your subnet) and would send it directly.Intra-Subnet = The postal carrier (switch), would know that the destination address is local and would send it directly to the recipient.For example, if you were on IP 191.54.38. To further this analogy, think of a router as aPost office. They basicallyProvide the same functionality. It doesn't make much differenceIf you have a router in your house, or a router in your business. As we move from the left toThe right, the geographic area continuously becomes more and more specific.To have TCP/IP, at some point, you must have a router. In our analogy,Each set of numbers may represent a geographic area.
This is what is calledA "hop". What happens if you want to send it to the building next-door?Your mail carrier would take the letter to the post office in your town, and thePost office would route the letter to the building next-door. We will get into the subnet masks later, for now let's assume there are 30 apartments in your building and the building next-door also has 30 apartments.To mail a letter within your own apartment building (subnet), a router/post office is not required.Okay, easy enough. 16, the letter would never leave your building.The concept of a subnet mask, is what tells the mail carrier which addresses are within a given network.As our analogy stands right now, we don't know how many apartments are in your building.
Your Town Post Office (ISP): I don't know anything about 191.55.x.x, I only know 191.54.x.x. 55.1.10.The process is basically the same, but it will include more "hops".In this scenario, your mail carrier would take the letter to your local post office, it would then be sent to a hub within your state, then the destination town's post office, then finally to the end recipient.The communication process would look something like this: 39.15,Your local router would simply forward your request to the Post Office that knowsNow, suppose your letter was addressed to a different town in your state, let's say 191. 38.15 andYou wanted to send your letter to 191.54.
Here are a few simple definitions to helpOctet = An octet is simply a group of 8 numbers. NoWorries, this is going to be very easy. Destination Town: Ok, this letter is addressed to 191.54.x.x, I know where that is so I'm going to send this letter directly to the end recipient.Of course, this is only a loose analogy and the IP addresses used to describe the process could have been anything.The takeaway from this first lesson is the router in your home or business, simply does not know where every possible destination IP address is located.TCP/IP Address Construct Watch a Video on this TopicA TCP/IP address is a 32 bit, binary number that has been converted to decimal.Whenever the word binary comes up, many people immediately become concerned. Hub Post Office: This letter is addressed to 191.54.x.x, those addresses are serviced by the post office in the destination town.
In other words, 32 bits equals 32 zeroesBinary = A number system that is based on two characters - 0 & 1.Okay, now let's convert our decimal IP address of 191.54.38.15 into binary:Remember that each octet represents eight binary digits - Each placement of thoseBinary digits represents a decimal number. Each set of numbersRepresent 8 binary digits (zeroes or ones).Bits = A bit is simply a single character. I know I said there are 8 numbers and I only showedYou four, but keep in mind that IP is in binary, not decimal.
The 1's in our binary subnet mask represents the network portion of ourIP address, and the 0's represent the hosts. WeGet this information by converting the decimal numbers within the subnet mask toBinary. To convert to a decimal number, we will add a 1 aboveEvery decimal number we want to add together to get to our decimal number and aZero for every number we are not going to add.Now we simply add each decimal number (on the bottom) each time we see a binary191.54.38.15 = 10111111.00110110.00100110.00001111A subnet mask is used to determine where the network ends and the hosts begin.
In this example, 8 0's = 2^8 = 256. 1,*The number of hosts on any network is determined by taking 2 to the power of the number of binaryZero's. And as you probably haveGuessed the fourth and final octet in our example is all 0's or all hosts.Wherever our 1's stop and our zeros begin is called our network boundary:In this example, the first three octets are our network and the last one representsHosts* = 192.168.1.1 - 192.168.1.254 (E.g.
We have a single network with 254 usable IP addresses for hosts (PC's,Now, let's take a look at what happens if we change our subnet mask:Just like the previous example, the first thing we need to do is to determine our networkBoundary by converting our decimal subnet mask to binary:Note that we can't use 192.168.0.0 as a host because it is the network address and 192.168.255.255 also can't be used because it is reserved for the broadcast address.However, all addresses in between the network address and the broadcast address can be assigned to hosts.Although it may look strange, addresses such as 192.168.0.255, 192.168.1.0, and 192.168.255.0 are all valid host addresses in the 192.168.0.0/16 network.So now we can use the same formula to determine the number of assignable hosts -Each class of IP addresses has a private address range.These ranges were created to conserve public IP addresses.Instead of issuing a real IP address to every host on your network, you can issue a private address and translate the private address to a public one when you communicate with the Internet.For example, a network with 200 or even 200,000 hosts, could use just one public IP address.This process is called NAT/PAT and will be covered in another lesson.Class A Private Address = 10.0.0.0/8. We willDiscuss this later, for now suffice it to say that the actual formula to determineHow many hosts is (2^n)-2, where n = the number of binary zero's.In our example n=8, so we have 2^8-2=256-2=254.