Calculate resistance value

Assignment Help Programming Languages
Reference no: EM13328096

Develop a PROLOG program that prompts the user for the colors of Band 1, Band 2, Band 3, and Band 4 and then displays the resistance in Kilo-ohms.

Develop a PROLOG program that prompts the user for the colors of Band 1, Band 2, Band 3, and Band 4 and then displays the resistance in Kilo-ohms. Assume that band 4 can only be Gold or Silver.

a) Present a main menu to the user about the following options:
a) Calculate resistance value
b) Help
c) Exit

The "help" option presents some information about the program and how to use it, and re-displays the main menu options. The "Exit" option terminates the program. The "Calculate resistance value" leads the user to a secondary menu as shown in Step 2.

b) The secondary menu prompts the user to select the band colors. For example:
a) Black
b) Brown
c) Red
d) Orange
e) Yellow
f) Green

Please select the color for band 1: 5
Please select the color for band 2: 0
Please select the color for band 3: 3
Please select the color for band 4: 11

The resistance value is: 50 ± 5 k?

Then the program should print back the main menu (Step 1).

c) If the user enters an invalid value, print an error message, and prompt the user for another value.

Reference no: EM13328096

Questions Cloud

Explain moles of methyl benzoate are isolated : The student starts with 0.97 moles of benzoic acid and 7.8 moles of methanol. At the end of the experiment 0.9 moles of methyl benzoate are isolated
Find the change in potential energy stored in jonathan body : Jonathan is riding a bicycle and encounters a hill of height h. At the base of the hill, he is traveling at a speed vi. What is the change in potential energy stored in Jonathan's body
Phosphorous pentachloride forms from phosphorus trichloride : Phosphorous pentachloride forms from phosphorus trichloride and chlorine: PCl3(g)+Cl2(g)->PCl5(g) given: ?Ssys=-170.2J/K, ?Ssurr=295.0J/K, ?Stotal=124.8J/K, reaction is spontaneous under standard-state conditions at 25
Find the final equilibruim temperature : a copper puece of mass 140g and of temperature 240 degree is placed into 360g of water at temperature 25 degree. Find the final equilibruim temperature
Calculate resistance value : Develop a PROLOG program that prompts the user for the colors of Band 1, Band 2, Band 3, and Band 4 and then displays the resistance in Kilo-ohms.
Explain two methods of positive identification are required : The possible compounds are listed below. Two methods of positive identification are required for each compound. Benzoic acid benzoin 1,4-dibromobenzene flourene o-Toluic Acid 4-aminoacetophenone
Find how far from the base of the building the hammer lands : A hammer slides down a roof of angle theta (respect to ground). It slides along the roof distance D. Find how far from the base of the building the hammer lands
How much will have saved if waited until age 35 to start : You are 25 years old and decide to start saving for your retirement. You plan to save $5000 at the end of each year (so the first deposit will be one year from now), and will make the last deposit when you retire at age 65.
Obtain the inductance of the solenoid : A 304 turn solenoid has a radius of 5.00 cm and a length of 20.0 cm, Find the inductance of the solenoid

Reviews

Write a Review

Programming Languages Questions & Answers

  Write pseudo algorithm which inputs age for valid voting

Write pseudo algorithm which inputs Age, displays "Yes, you can vote" if Age is 18 or older and displays "You are too young to vote" if Age is less than 18, and displays nothing else.

  Create application to read customer information from file

You have been tasked to create the application which reads customer information from file to determine in which states you have customers.

  Write program to take as input salesperson-s expected sales

Write program to take as input the salesperson's expected weekly sales and outputs the wages paid under each plan as well as announcing the best-paying plan.

  Program to generate a random number between a range

Write down a program to generate random number between 1 and 100 and asks user to guess what number is.

  Method takes string and integer as parameters

Write a method called multiConcat which takes a String and an integer as parameters. Return String made up of the string parameter concatenated with itself count times.

  Create ajax-based product catalog

Create an AJAX-based product catalog which obtains its data from JSON files located on the server. The data should be separated into four JSON files.

  During the middle ages

During the Middle Ages, to determine the successor to the throne of France, the French used the Salic law. It is formulated as follows: the next to the throne is the living male descendant of the most direct male royal. Male royal here means that ..

  Explain relationship between xbrl and semantic web

How do HTML 5, RDF (Resource Description Framework), and OWL (Web Ontology Language) relate to the semantic web? Explain the relationship between XBRL and the semantic web.

  Write program to read two-digit hexadecimal sequences

Write down the program which reads 2-digit hexadecimal sequences from the text file and shows their decimal equivalents.

  Write statement that calls add to compute sum of sales

Add is a method that accepts two int arguments and returns their sum. Write a statement that calls add to compute the sum of euroSales and asiaSales and that stores this value in eurasiaSales .

  Write a program that generates all the factors of a number

Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

  Creating application to test class rectangle

Write down application to test class Rectangle.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd