The equation of a parabola can be expressed in either standard form (y = ax? + bx + c) or vertex form (y = a(x – h)² + k). Write a program that prompts the user to enter a, b, and c as integers in standard 4ac – b and k -b form and displays h 2a | in the vertex form. Display h 4a and k as rational numbers. i
Q: Given any n by n square matrix, write a program that reflects the matrix across its major diagonal.…
A: In the above problem if we carefully analyze the problem we can see that the result matrix is the…
Q: Write a program (Lab8_ex4_ld.py) that generates a random even positive integer less than 10 and…
A: Generate random number from 1 to 5 and multiply with 2 and then we can print the series
Q: Wrist a java program to get a mirror right angled triangle after taking number of rows from user
A: Start Input number of rows using three for loop print mirror right angled triangle print pattern…
Q: Given a string str and number n, write a program in Javascript that recursively appends a copy of…
A: JavaScript program to solve the given problem is below.
Q: In mathematics, a prime number is a natural number greater than 1 that is not a product of two…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[]…
Q: in python Write a program that reads three edges for a triangle and computes the perimeter if the…
A: We need to write a Python program to compute the perimeter of a triangle if all the inputs are…
Q: Write a program for calculating these roots and for graphing them as points on the unit circle.…
A:
Q: A self-avoiding walk in a lattice is a path from one point to another that does not visit the same…
A: Given: A self-avoiding walk in a lattice is a path from one point to another that does not visit the…
Q: Write a program to count all possible solutions for the Eight Queens problem and display all the…
A: Sample Response: //C++ program to count and print all solution of eight queens…
Q: Can I please get help with this Karel/C ++
A: Solution: #include <stdio.h> // Maze size#define N 4 bool solveMazeUtil(int maze[N][N], int…
Q: Draw a graph in Python to denote the following point? Red Dots for A-D Blue Dots for E-F Black Dots…
A: In this question we have to plot a graph using python. We have been given a x-axis and y-axis which…
Q: Given positive integers n and r, list all the r-permutations, with repetition allowed, of the set…
A: Since no programming language is mentioned, I am using python. Algorithm: Start import itertools…
Q: 2). Write a program to implement the following graph representations and display them. i. Adjacency…
A: import java.util.LinkedList; class Main { int vertex; LinkedList<Integer> list[];…
Q: In mathematics, a prime number is a natural number greater than 1 that is not a product of two…
A: The answer given as below:
Q: A Python Programming in Physics and Materials Science.
A: The first goal in learning any new computer programming system is always thesame: Write and run a…
Q: Blackout Math is a math puzzle in which you are given an incorrect arithmetic equation. The goal of…
A: Solution for following question -
Q: The word ladder game was invented by Lewis Carroll in 1877. The idea is to begin with a start word…
A: import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import…
Q: A graph is given below. What is the return value to run the graph function first( 0 )? int first(int…
A: A/Q first(v) will return first neighbor. in given graph, 0's neighbors are 1 and 4. and first one…
Q: How to write a program in java that can read numbers from a text file into an array then output…
A: Use the object of scanner class to open the file and take integers from it to store in the array.…
Q: a) Write a program that asks user to enter number of vertices in a directed graph and then the…
A: Program: //header file #include<bits/stdc++.h> using namespace std; //definition of main…
Q: Here is the code to create a graph in Python: G2 = nx.gnp_random_graph(10, 0.1, seed=1234)…
A: Solution Programming approach Import package declare and define variables ' define conditional…
Q: Write a program that reads three edges for atriangle and computes the perimeter if the input is…
A: Program approach: Input edge 1, edge 2, and edge 3. Check if triangle is valid or not. If it is…
Q: Implement the following: 1) Store the following data into a tuple, colors: red, green, 2) Store the…
A: type() is a function in python used to print the type of a variable
Q: Write a program that asks user to enter number of vertices in an undirected graph and then the…
A: Program: //Header file #include <iostream> #include<queue> //Using namespace using…
Q: C++
A: #include<iostream> #include <list> using namespace std; // This class represents a…
Q: In mathematics, a prime number is a natural number greater than 1 that is not a product of two…
A: Note: Number 4 is not a prime number because it is divisible by 2. (2*2=4) Comments mentioned in…
Q: Write while-loop structure using a well commented java programming code that can print the following…
A: Program : //Class definitionclass Main { //defining main program structure public static…
Q: Python's syntax is as follows: Print a list of all seats in a theater based on the parameters num…
A: Note: Please take care of indentation while writing the code.
Q: Write a program that asks user to enter number of vertices in an undirected graph and then the…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: In mathematics, a prime number is a natural number greater than 1 that is not a product of two…
A: Prime numbers: A number is said to be a prime number if only if the number is divisible 1 and…
Q: Write a program that reads three edges for a triangle and computes the perimeter if the input is…
A: NOTE : Since programming language is not mentioned. Therefore answering the question in Python…
Q: Write a program to plot x= y , x go to -15 to 65 with increments of 15 And then tis radius of circle…
A: Requirements :-
Q: please complete the following in JAVA Implement the graph ADT using the adjacency list…
A: According to the information given:- We have to use adjacency list structure and adjacency matrix by…
Q: Write a program to print image graph using " horiz=TRUE "
A: The R code for horizontal graph
Q: Write a program in python that defines a function to illustrate 20 random polygons with 3-11 sides,…
A: program in python that defines a function to illustrate 20 random polygons : def draw_polygons():…
Q: Write a program to plot x= y , x go to -15 to 65 with increments of 15 And then t is radius of…
A: REQUIREMENTS :- APPROACH :- STRAIGHT FORWARDED QUESTION . PLEASE SEE MALTLAB CODE WITH OUTPUT AND…
Q: An n × n square consists of black and white cells arranged in a certain way. The problem is to…
A: // Program #include<iostream> #include<fstream> #include<string> using namespace…
Q: The classic Eight Queens puzzle is to place eight queens on a chessboard such that no two queens can…
A: The eight queens puzzle is the task of arranging eight chess queens on an eight-by-eight chessboard…
Q: Chemical reaction rates are proportional to a rate constant, k, which changes with temperature…
A:
Q: There is a line y=mx+c and a point (a,b) on a graph and our aim is to make the line touch the point…
A: In order to keep the good fit a set of points, in a straight line equation, we will require the…
Q: IN VISUAL BASIC, solve Each new term in the Fibonacci sequence is generated by adding the previous…
A: Answer :
Q: Write a program (Lab8_ex4_ld.py) that generates a random even positive integer less than 10 and…
A: Python code is given below with comment for better understanding.
Q: Write a program that plays the tic-tac-toe game. Two players take turns clicking an available cell…
A: code: import os#for os based operations gme_bd = [' ',' ',' ',' ',' ',' ',' ',' ',' ',' ']…
Q: Consider an undirected graph G = (V,E), in which each node u 2 V may be colored with some color…
A: #include <iostream> #include <list> using namespace std; class Graph {…
Q: a) Write a program that asks user to enter number of vertices in an undirected graph and then the…
A: Program code: //Header file#include <iostream>#include<queue>//Using namespaceusing…
Q: Our main objective is to implement breadth-first-search (BFS) to print the vertices of a graph G.…
A: GIVEN: #include<iostream>#include<vector>#include<queue>using namespace…
Q: Write an algorithm for a program that determines all composite numbers between 1 and 20
A: In order to find all the composites between 1 and 20, the following steps are performed : Using…
Q: Loop Problems Write the program that would generate the multiplication table for numbers 1 to 10.…
A: AS it was not specified I have done the program in C language Code: #include <stdio.h> int…
Q: from the following source code, obtain the graph of sin(x) n c language #include #include int…
A: The signal is the electromagnetic or electrical current which carries the data from one system or…
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
- 1. Write a program that prompts the user to enter the length from the center of a pentagon to a verte and computes the area of the pentagon, as shown in the following figure. 5 x s? The formula for computing the area of a pentagon is Area = (€) 4 x tan Where s is the length of a side. The side can be computed using the formula s = 2r sin where r is the length from the center of a pentagon to a vertex. Round up two digits after the decimal point.Write a program that asks user to enter number of vertices in an undirected graph and then the adjacency matrix representing the undirected graph. The program, then, must display whether the given graph is connected or not. Sample 1Enter number of vertices: 3Enter adjacency matrix:0 1 11 0 01 0 0The graph is connected.Write a program that enables the user to addor remove points by clicking the left or right mouse button and displays a noncrossedpolygon that links all the points, as shown in Figure a. A polygonis crossed if two or more sides intersect, as shown in Figure b. Use thefollowing algorithm to construct a polygon from a set of points:
- Write a program that asks user to enter number of vertices in an undirected graph and then the adjacency matrix representing the undirected graph. The program, then, must display whether the given graph is connected or not.You can plot shapes in Python using line graphs in matplot lib by providing the coordinates of the vertices of the shapes as x, y pairs and using the matplotlib.pyplot.plot (i.e. plt.plot) function. Draw a triangle, square, pentagon, hexagon and heptagon. Note: Use symmetry, starting with the origin at (0,0), and set the distance from the origin to the vertex to be of length 1.0 (otherwise this becomes very complicated for some shapes).Given below are two statements: S1: If a Graph G is n colorable then it's also n+1 colorable. S2: Every Bipartite graph is 2 colorable Which of the above statement(s) is/are correct?
- This is a python program Sales Bar GraphWrite a program that reads in the sales for five stores from a data file.Use the data to create a bar graph as follows:SALES BAR GRAPH:(Each * = $100)Store 1: *******Store 2: *********Store 3: ***********Store 4: *****Store 5: *******Snack Bar MenuWrite a program that allows the user to choose from the following menu untilhe/she chooses to exit. The program should keep a running total of the chargesand then add 6% sales tax to calculate the final bill. Display the total to theuser.1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitInput validation: The user must choose 1 - 5 from the menu.Example Output:Welcome to Yum Yum Snack Bar!Please choose from the following menu:1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitEnter your choice here: 1Current total: $6.00 Please choose from the following menu:1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitEnter your choice…Using Javascript and HTML: An interesting application of computers is drawing graphs and bar charts (sometimes called histograms). Write a script that reads five numbers between 1 and 30. For each number read, output HTML5 text that displays a line containing the same number of adjacent asterisks. For example, if your program reads the number 5, it should out HTML5 test that displays *****.Create a program that provides visualization for three-dimensional plane: Animate your solution using any animation programming language like matlab please. (so the output should show graph of the exponential function inputted by the user)the system should be user-input, and the output should show graph of the exponential function inputted by the user) The topic is all about Inverse Laplace Transform on Exponential function.
- A popular word game involves finding words from a grid of randomly generatedletters. Words must be at least three letters long and formed from adjoining letters.Letters may not be reused and it is valid to move across diagonals. As an example,consider the following 4 * 4 grid of letters: A B C DE F G HI J K LM N O P The word “FAB” is valid (letters in the upper left corner) and the word “KNIFE”is valid. The word “BABE” is not valid because the “B” may not be reused. Theword “MINE” is not valid because the “E” is not adjacent to the “N”. Write a program that uses a 4 * 4 two-dimensional array to represent the gameboard. The program should randomly select letters for the board. You may wishto select vowels with a higher probability than consonants. You may also wish toalways place a “U” next to a “Q” or to treat “QU” as a single letter. The programshould read the words from the text file words.txt (included on the website withthis book) and then use a recursive algorithm to…please code in python You place a pawn at the top left corner of an n-by-n chess board, labeled (0,0). For each move, you have a choice: move the pawn down a single space, or move the pawn down one space and right one space. That is, if the pawn is at position (i,j), you can move the pawn to (i+1,j) or (i+1, j+1). Ask the user for the size of a chessboard, n (integer). Find the number of different paths starting from (0,0) that the pawn could take to reach each position on the chess board. For example, there are two different paths the pawn can take to reach (2,1). Look at the diagrams below to convince yourself of this. You can see the four paths that you can take by move 2. Start -> Move 1 -> Move 2 (0,0) -> (1,0) -> (2,1) (0,0) -> (1,0) -> (2,0) (0,0) -> (1,1) -> (2,1) (0,0) -> (1,1) -> (2,2) Print the board with the number of ways to reach each square labeled as shown below. For example: Enter a board size: 4 1 0 0 0 1 1 0 0 1 2 1 0 1 3 3 1IN JAVA Alice and Bob are playing a board game with a deck of nine cards. For each digit between 1 to 9, there is one card with that digit on it. Alice and Bob each draw two cards after shuffling the cards, and see the digits on their own cards without revealing the digits to each other. Then Alice gives her two cards to Bob. Bob sees the digits on Alice’s cards and lays all the four cards on the table in increasing order by the digits. Cards are laid facing down. Bob tells Alice the positions of her two cards. The goal of Alice is to guess the digits on Bob’s two cards. Can Alice uniquely determine these two digits and guess them correctly? Input The input has two integers p,q (1≤p<q≤9) on the first line, giving the digits on Alice’s cards. The next line has a string containing two ‘A’s and two ‘B’s, giving the positions of Alice’s and Bob’s cards on the table. It is guaranteed that Bob correctly sorts the cards and gives the correct positions of Alice’s cards. Output If Alice can…