(b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or scalene. All 3 sides of an equilateral triangle have the same length. An isosceles triangle has two sides that are the same lengths and a third side that is a different length. If all of the sides have different lengths then the triangle is sealene. Write a program that reads the lengths of 3 sides of triangles from the user. Display a message indicating the type of the triangle.
Q: Example: (H.W) Given a quadratic equation as follows: ax2 + bx + c = 0 if b*b-4*a*c_is greater than…
A: ! ---------------------------------------------------! Solve Ax^2 + Bx + C = 0 given B*B-4*A*C…
Q: A triangle is considered valid if the sum of each 2 sides is greater than the remaining third side.…
A: We have to write a program a program that takes the length of three sides and print "equilateral",…
Q: Car experts recommend changing your air filter as often as every 6000 miles if the oil’s category is…
A: Given:
Q: Write a program that takes a range from the user and display all the even numbers between the range…
A: Note - Since there is nothing mentioned about the programming language to be used, so this program…
Q: Write a program that displays every integer between 1 and 100 that is divisible by 5 or 7, but not…
A: Algorithm: 1.Include required header files 2.include main function 3.create a for loop 4.use if…
Q: 3. Write a program that prints a diamond as follow:
A: For the diamond at the first line and at the last line there will be one star. For other lines there…
Q: 3. For three resistors connected in series, the total resistance is the sum of the individual…
A: Given: Resistors are connected parallel Therefore Total resistance is Total Resistance =…
Q: Q2/ Write a program that reads a code and temperature. If the code is 1, convert from centigrade to…
A: C programming: C programming is a procedural programming language that was developed by Dennis…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: In the above code, it has been asked to print the area and volume of the sphere, in the following…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere 4…
A: Given: The program is written in C language to find area and volume of sphere.
Q: 4. Write a program that simulates the rolling of two dice. The program should use rand twice to roll…
A: Code: #include <stdio.h>#include <stdlib.h>#include <time.h> int main(){ int…
Q: Suppose that the rent for an apartment is $1000 this year and increases 3% every year. Write a…
A: Summary: In this question, we have been given one statement and we have to code it. We have given…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program: // include required header files #include <iostream> #include <iomanip>…
Q: A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid, the drag…
A: Hello student Greetings Hope you are doing great. Thank You!!!
Q: Q1/A-Write a program to compute the mass flow rate of a fluid (in kg/sec) through a thermal unit…
A: Code: Dim A as DoubleDim M as DoubleDim Po as Double Dim K as DoubleDim R as DoubleDim T0 as…
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Note: As no programming language is mentioned, therefore answering the given question in python.…
Q: Question 1 Write a program that asks the user to enter the number of passengers in an airplane and…
A: "Since you have not mention any programming language, so will write our program in C language." C…
Q: Can someone help me answer this in Coral programming language? 1) The year must be divisible by 4…
A: Answer :
Q: Procedure 2. Write a program that takes the x-y coordinates of a point in the Cartesian plane and…
A: Concept: If X is +ve and Y is +ve, then Quadrant is 1 If X is +ve and Y is -ve, then Quadrant is 4…
Q: 9) Write a program that reads a temperature value and the letter C for Celsius or F for Fahrenheit.…
A: According to the question below the solution: Output:
Q: Task: Write the full program that has the following main function. Your program should ask the user…
A: Given: Program to find area or perimeter of the rectangle.
Q: Set the value of the variable a to be 191 Set the value of the variable b to be 3 If a is divisible…
A: 1. Set the value of the variable a to be 191 2. Set the value of the variable b to be 3 3. If a is…
Q: 2. - Write a program that displays the area and perimeter of a rectangle with the width of 5 And…
A: width=5; #initialize widthheight=7.5; #initialize height area=width*height; #calculate area…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: Solution Code word = input("enter")is_palindrome = Truei=-1for j in range(len(word)): if word[j]…
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Step1 : inputs age (in years), weight (in pounds), heart rate (in beats per minute), and time…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: Here, first you need to declare some variables for all salaries. Then prompt user to enter basic…
Q: 4. Write a simple program that checks the coordinates of a point taken from a user and identifies…
A: Code: //include the required headers #include<iostream> using namespace std; //main method…
Q: Write a program using else if to input the number of students(stu) and number of teachers(tea) in…
A: C used to answer this question
Q: Write an application that reads the (x,y) coordinates for two points. Compute the distance between…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
Q: or the three poiats 4 (Xa, Ya), B (Xb, ¥5) and C (Xe, ¥e) the cquation of the line L parallel to the…
A: Java Code :- public class MyClass { public static void main(String args[]) { double…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: C++ program is given below
Q: C++ Programming Exercise: Ther are 50 apartment units. When the rent is $600 per month, all the…
A: #include <iostream>using namespace std;#include<fstream>int main (){double rent,…
Q: 4. Write a simple program that checks the coordinates of a point taken from a user and identifies…
A: code: //include the required headers #include<iostream> using namespace std; //main method…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere 4…
A: Given: The program is written in C language to find area and volume of sphere.
Q: Write a program that inputs a line of text, replaces all punctuation marks with spaces.
A: Program: //header files #include <iostream> #include <string> using namespace std;…
Q: Procedure 2. Write a program that takes the x-y coordinates of a point in the Cartesian plane and…
A: #include <stdio.h>void quadrant_of_x_y(float x, float y){ if (x > 0 and y > 0)…
Q: C++ coding In order to paint a wall that has a number of windows, we want to know its area. Each…
A:
Q: 3. The program that asks a number and test the number whether it is multiple of 5 or not, divisible…
A: #3. number = int(input("Enter a number: ")) # taking the number from user if…
Q: Exercise : Make a program that takes 5 test scores from the user, calculate the average Score and…
A: According to the Question below the Solution: Output:
Q: The following formula gives the area of a triangle and volume of a triangular prism. Area = s(s –…
A: The cost of the carpet per square meter is = area * 1010.85
Q: Problem Description Did you know that in lotteries, a 3-digit number with the same numbers in all…
A: Task :- Write a Java program to identify if given number will hit the jackpot or not. Java program…
Q: 2. Write a program that computes the cost of painting and installing carpet in a room. Assume that…
A: Actually, program is a executable software that runs on a computer.
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Required: write a program to check if a triangle is valid or not and if valid then check if it is…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: PROGRAM CODE: word = input("Enter a word: ") // take the word from the…
Q: the electrical resistance r (in ohms) of a metal wire is given by the formula r = (ml)/ a where m is…
A: As no programming language is mentioned it is solved using basic C++
Q: The dynamics of a comet is governed by the gravitational force between the comet and the Sun, f=…
A: I give the code in Python along with output and code screenshot
Q: Car experts recommend changing your air filter as often as every 6000 miles if the oil’s category is…
A: import java.util.Scanner;class CarDemo{public static void main(String[] args){ int…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- PLEASE CODE IN PYTHON Problem Description An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other. Input Specifications The input for the program will come from an input file in.dat, in.dat will have two lines of data, line (1) will have the first phrase and the line(2) will have the second phrase. You may assume that the input only contains upper case letters and spaces. Output Specifications The program will print out one of two statements: ”Is an anagram.” or, ”Is not an anagram.” All output will be to the screen. Sample Input CS AT WATERLOO COOL AS WET ART Output for Sample Input Is an anagram.Program Requirements This program should add numbers 1 through 9 one a time, via a button click, display the result, and allow the user to Clear the total to zero. Your Starter Codeworks for numbers 1 through 3. Give it a try, push the buttons, to see what it does. Extending Structured Programs is Easy In this assignment, you use existing code to: identify the patterns in a program modify the patterns in order to extend the functionality of the program Your Task for this Assignment Requirements: Extend this program to create the 6 more HTML buttons and 6 more Javascript functions. Software Development Best Practice: Incremental Development Do not program all your code at once like you were editing some essay. Making a big mess and then trying to patch it up all one once... is a nightmare. Add one button and its function Test it Repeat with the next button Pattern One: HTML Button Add your HTML code where the highlighted area is in the image below. Copy an existing button, and…Python question Application: Python Fragment Formulation (Q1 – Q4) In this group of questions you are asked to produce short pieces of Python code. When you are asked to "write a Python expression" to complete a task, you can either give the expression in one line or break down the task into several lines. The last expression you write must represent the required task. Question 1 (Reduce parentheses) Give an equivalent version of this expression by removing as many redundant parentheses as possible, without expanding the brackets or simplifying. (x**(2**y))+(y*((z+x)**3)) Question 2 (Translate arithmetic concept into Python) You are given a list of numbers, named numbers, containing 3 integers. Write a python expression (one line) that evaluates to True if and only if the product of any two numbers in the given list is greater than the sum of all three numbers. Note: the product of two numbers, x and y is x*y. Question 3 (List/table access) You are given a table,…
- Problem Description: The bird of paradise called the Helipixsal is renowned for its magnificent tail feathers which range in number from five to nine ornate feathers each of a different length. Their "magnificence" is quantified by the rather simple process of counting the exact number of tail feathers and multiplying this by the difference in the length of the minimum and maximum lengths of tail feather. You are to write a simple program that will allow the user to enter the length of each tail feather individually and keep on entering feathers until a -1 is entered. The program will then return the quantified "magnificence" factor.Treasure Hunter description You are in front of a cave that has treasures. The cave canrepresented in a grid which has rows numbered from 1to , and of the columns numbered from 1 to . For this problem, define (?, )is the tile that is in the -th row and -column.There is a character in each tile, which indicates the type of that tile.Tiles can be floors, walls, or treasures that are sequentially representedwith the characters '.' (period), '#' (hashmark), and '*' (asterisk). You can passfloor and treasure tiles, but can't get past wall tiles.Initially, you are in a tile (??, ). You want to visit all the treasure squares, andtake the treasure. If you visit the treasure chest, then treasurewill be instantly taken, then the tile turns into a floor.In a move, if you are in a tile (?, ), then you can move tosquares immediately above (? 1, ), right (?, + 1), bottom (? + 1, ), and left (?, 1) of thecurrent plot. The tile you visit must not be off the grid, and must not be awall patch.Determine…21. GeeBees Clothiers is having a sale. The store manager wants a program that allows a salesclerk to enter the original price of an item and the discount rate. The program should calculate and display the amount of the discount and the sale price. The algorithm in Figure 2-21 is supposed to solve this problem, but it is not working correctly. Correct the algorithm, and then desk-check it using an original price of $100 and a discount rate of .25 (the decimal equivalent of 25%). Output: discount sale price oviginal príce discount rate Imput: Algorithm: 1. enter the original price and discount rate 2. calculate the sale price by subtracting the discount from the original price 3. display the discount and price
- Code uses C++ language If the user chooses to generate a Pentagono This is a combination of a triangular shape and a square shape -- a symmetrictriangle sits on top of a rectangle.o The triangular shape must be symmetric about the vertical axis. There must beexactly one character in the first line, and the number of characters increases by2 in every successive lineo The rectangle shape must have LENGTH lines of height and all lines are 13characters wide.o Make sure to add delay to view a progressively growing pentagon, otherwise youwill just see the final shape. Code for triangle: for (int i = 1; i <= length; i++) { sleep (1); for (int j = length - i; j > 0; j--) cout << " "; for (int b = 1; b <= i; b++) cout << char(rdm) << " "; cout << endl; } Code for square: for (int row = 1; row <=…Coin Toss Write a function named coinToss that simulates the tossing of a coin. When you call the function, it should generate a random number in the range of 1 through 2. If the random number is 1, the function should display "heads". If the random number is 2, the function should display "tails". Demonstrate the function in a program that sks the user how many times the coin should be tossed and the coin then simulates the tossing of the coin that number of times.C++ Visual 2019 Write a program that determines which of five geographic regions within a major city (north, south, east, west, and central) had the fewest reported automobile accidents las year. It should have the following two functions, which are called by main: int getNumAccidents() is passed the name of a region. It asks the user for the number of automobile accidents reported in that region during the last year, validates the input, then returns it. It should be called once for each city region. void findLowest() is passed, the five accident totals. It determines which is the smallest and prints the name of the region, along with its accident figure. Input Validation: Do not accept an accident number that is less than 0.
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }(Physics) Buoyancy is the upward force a liquid exerts on a submerged object, as shown in Figure 6.9. The buoyancy force is given by this formula: B=pgV Bisthebuoyancyforce( lbforN).isthefluiddensity( slug/f t 3 orkg/ m 3 ).gistheaccelerationcausedbygravity( 32.2ft/se c 2 or9.8m/ s 2 ).Vistheobjectsvolume( f t 3 or m 3 ). a. Using this formula, write a function named buoyantForce(double ro, double vol, int units) that accepts a fluid density, the volume of an object placed in the fluid, and the units to be used(1=U.S.Customaryunits,2=metricunits), and returns the buoyancy force exerted on the object. b. Include the function written for Exercise 6a in a working C++ program, and use your program to complete the following chart:(Conversion) a. Write a C++ program to convert meters to feet. The program should request the starting meter value, the number of conversions to be made, and the increment between metric values. The display should have appropriate headings and list the meters and the corresponding feet value. If the number of iterations is greater than 10, have your program substitute a default increment of 10. Use the relationship that 1 meter = 3.281 feet. b. Run the program written in Exercise 6a on a computer. Verify that your program begins at the correct starting meter value and contains the exact number of conversions specified in your input data. c. Modify the program written in Exercise 6a to request the starting meter value, the ending meter value, and the increment. Instead of the condition checking for a fixed count, the condition checks for the ending meter value. If the number of iterations is greater than 20, have your program substitute a default increment of (ending value - starting value) / 19.