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

  Design a small dictionary using the binary search tree

Design a small dictionary using the Binary Search Tree data structure. Each entry may include a word and its definitions. You should create the tree structure/dictionary using data input from a text file. After the dictionary is created, the user ..

  Store normal for each face in array using technique

Use technique of the Astle text to store normal for each face in faceData array enable lighting and add point light source if the light is positioned at the origin

  Pseudocode of program that will prompt user for number

Write pseudocode and flowchart for a program which will prompt user for a number, prompt the user for an operator (+,-,*,/), prompt the user for another number.

  Write non-recursive to perform algorithm

Write a non-recursive (i.e., iterative) function selectionSort() to perform this algorithm. Use it in a program that reads from a file a sequence of integers.

  Building instruction set simulators

Building Instruction Set Simulators

  Write function to merge contents of two sorted arrays

Write a function which will merge contents of two sorted (ascending order) arrays of type FLOAT values, use efficient bubble sort to sort two arrays first and then use merger function.

  Program to store item-s price

Suppose a c++ program requires to store item's price. Price will range from $15.50 to $20. Write down assignment statement which allots value $16.23 to variable.

  Design electronic submission of assignments from students

This system must manage electronic submission of assignments from students to instructors. It must keep track of which students have submitted assignments and must allow instructors to manage the grading.

  Using the irvine32 library functions

Create 32 random points which have (x, y) co-ordinates

  Write liberty basic to make payment of current balance

Makes a payment equal to 5 percent of current balance suppose the customer makes no new purchases. Must be written in Liberty Basic.

  Design an appropriate set of classes to solve the problem

The purpose of this project is for you to demonstrate your understanding of object oriented software development in practice.

  Write class which accepts user-s hourly rate of pay

Write down class which accepts the user's hourly rate of pay and number of hours worked. Display user's gross pay, withholding tax (15% of gross pay).

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