Flowchart for the numbered New York City streets problem. Program: Determine the direction of a numbered NYC street. Get street If street is even Then Display Eastbound Else Display Westbound End If
Q: Write an algorithm and draw a flowchart to check a number it is positive or negative, if it is…
A: The algorithm is shown below. Algorithm: Read the value of n if(n>=0) then Read the…
Q: subject : theory of computer science The regular expression (a+b)*a(a+b)*a(a+b)* will always…
A: The above question is solved in step 2:-
Q: Write program in PHP language to take 2 number and find the remainder when a dividing by b.
A: Required:- Write a program in PHP language to take 2 numbers and find the remainder when dividing by…
Q: 1. Write an algorithm and draw a flowchart to check a number it is positive or negative, if it is…
A: Start n<-Enter a number if(n<0) z<-(a^2+b^2)/2*c*d else z<-(c^2+d^2)/2*a*b End
Q: Write an algorithm and draw a flowchart to solve the following problems: 1. Read the marks of 3…
A: ALGORITHM: start Declare student 2D array for storing marks of 3 students for 3 courses. Declare…
Q: Write an algorithm and draw a flowchart to check a number it is positive or negative, if it is…
A: Note: As per the guidelines can answer the first question. Please re-submit the remaining…
Q: Write an algorithm and draw a flowchart to solve the following problems: 1. Read 3 student marks for…
A: Algorithm: An algorithm is a step-by-step set of instructions to solve a particular problem.…
Q: Write an algorithm and draw a flowchart to solve the following problems: 1. Read 3 student marks for…
A: The algorithm is a step-by-step process to perform a particular task whereas the flowchart is its…
Q: PYTHON CODE ONLY!! calculating the base 2 log of a number: y = log2(x)
A: First, we will input the value of x. Then using the flow chart given above we will write code. In…
Q: Q3/By using (Qbasic or MS Excel) write program to calculate area and circumference of a square if…
A: Required: By using (Qbasic or MS Excel) write program to calculate area andcircumference of a square…
Q: IN C PROGRAMMING LANGUAGE Input a 5 digit positive integer and print the count of ODD digits in the…
A: I give the code in C along with output and code screenshot
Q: Write a program that prints the next 20 leap years.
A: A year is leap year if it is divisible by 4 and not divisible by 100, or it is divisible by 400. To…
Q: Practice Questions • Write an Algorithms & draw a Flowchart for the following 1. To accept basic…
A:
Q: Write an algorithm and draw a flowchart to solve the following problems: 1. Read 3 student marks for…
A: To write an algorithm and draw flowchart .
Q: 5. Write an algorithm and draw a flowchart to read two numbers. • If both the numbers are negative,…
A: ANSWER:-
Q: 1. Write an Algorithm and Flowchart for the following (5+5=10) Ask the user to give input…
A: 1: Algorithm:- 1.Calculate the distance between P and Q 2.Compare it with the radius : -If…
Q: Flowchart for the numbered New York City streets problem.e Program: Determine the direction of a…
A: The java code of the given algorithm/flowchart is given below:
Q: Draw a flowchart to find all the roots of a quadritic equation ax2+bx+c=0.
A: A flowchart is a type of diagram that represents the flow of work or process. Steps of Algorithm:…
Q: Write an algorithm and draw a flowchart to read an employee name (NAME), overtime hours worked…
A: Algorithm The algorithm is defined as the brief information or introduction which acts as the steps…
Q: Write an Algorithm and flowchart for the student marks if marks is greater than 80 then eligible…
A: ALGORITHM Input: marks Output: if marks is greater than 80 then displays "eligible for A grade"…
Q: Z - Three Numbers Given two numbers K and S. Determine how many different values of X, Y and Z such…
A: Basically, two numbers ‘k’ and ‘s’ are taken as input from user. Then combinations of elements of x,…
Q: Design a flowchart or pseudocode for a program that accepts two numbers from a user and displays one…
A:
Q: Create the equivalent flowchart and algorithm. Compute the semestral grade considering the…
A: Flow chart is pictorial description of an algorithm.
Q: Draw the flowchart then write the C program using switch. The program reads one character ope. Then…
A:
Q: Write an algorithm, pseudocode and flowchart for the following problem. 2. To calculate the gross…
A: - Input the Basic salary - if basic salary is greater than 5000 then, Da = 110 % hra = 20 %…
Q: Write a Flowchart algorithm with a natural value to calculate the following sequence. X1 -2 x2 - 4 S…
A: Suppose we are calculating the value of the given sequence for first 'n' terms. The flowchart is…
Q: A= 1011 ,, B= 1010
A: Note:- Your answer is almost correct.
Q: 3. Write an algorithm and draw a flow chart to accept the weight and the height. Then caleulate the…
A: Algorithm: Inquire the user to enter the person weight and height Calculate the body mass index…
Q: Write an algorithm and draw a flowchart to check if a given number is divisible by 7.
A: Algorithm - An algorithm is a set of well defined rules which are meant to solve a problem.…
Q: C program based on the algorithm below Welcome to the temperature conversion program. Please…
A: PROGRAM: //Header files #include <string.h> #include <stdio.h> //Defining the main int…
Q: Write an algorithm and draw a flowchart to solve the following problems: -Find the smallest…
A: Algorithm to find smallest among 3 numbers: Check if the first element(a) is smaller than second(b)…
Q: 4. Draw a flowchart for the following algorithm: When two points in time are compared, each given as…
A: flowchart is a graphical presentation which shows flow of controls and execution of statements.
Q: Write an algorithm and draw a flowchart to check a number it is positive or negative, if it is…
A: To write an algorithm and draw a flowchart to check a number it is positive or negative, if it is…
Q: Design an algorithm that prints the sum of odd numbers from 1 to 50: Also draw its flowchart?
A: Given Design an algorithm that prints the sum of odd numbers from 1 to 50: Also draw its flowchart?
Q: Draw the flowchart and write an algorithm to find the reverse of a given number.
A: The Answer is
Q: Design a flowchart for the followings: if value is equal to 3, day of the week is Tuesday; els if…
A: it is a start symbol it is a conditional symbol(it is used to check condition) it is used to print…
Q: Write an algorithm and draw a flowchart to solve the following problems: 5. Check whether a number…
A: Algorithm: An algorithm is a step-by-step instruction to solve a particular problem. Flowchart:…
Q: Flow Chart Ask the user his/her birthdate. Compute for the age. Display "you are still a minor" if…
A: To Do: To design the flow chart.
Q: 5. Write the Algorithm for the given Flowchart. Put Start and Stop at the beginning and End. Leave…
A: Answer: Algorithm is a step by step process used to perform a specific task/program.
Q: In Python create a program that reads two positive integers a and b from user and print the…
A: Given: In Python create a program that reads two positive integers a and b from user and print the…
Q: 26. Draw the flowchart for a program that reads the value of integer x and prints "Positive" if x>0,…
A: Draw the flowchart for a program that reads the value of integer x and prints "Positive" if x>0,…
Q: Write an algorithm and draw a flowchart to solve the following problems: 1. Read the marks of 2…
A: As per Bartleby guidelines: “Since you have asked multiple question, we will solve the first…
Q: Pseudocode, Algorithm & Flowchart
A: Given :- In the above question, the statement along with the parameters is mention in the above…
Q: Q1. a) Draw a flowchart for the following algorithm (pseudocode) and also find the output of the…
A: The given is the pseudocode in algorithm form which reads in 3 numbers and compare the numbers.…
Q: 1- Draw a flowchart for a program that reads N numbers from the user and prints out their odd…
A: flowchart is :-
Q: draw a flowchart to find if a number is positive, negative, or zero using if else-if else structure
A: Introduction: a flowchart is a diagram that shows how the control structure works in the program.…
Q: Write an algorithm and draw a flowchart to read two numbers. • If both the numbers are negative…
A: 1) Create function Operations() 2) Take input of two numbers num1 and num2 from the user. 3) If both…
Q: Write an algorithm (pseudo code) [OR draw a flowchart] to solve the following problems: Problem 1:…
A: An algorithm (pseudocode) is an informal description of the steps used to solve a specific problem.…
Q: Design an algorithm that takes a number as an input and displays its table? Also draw flowchart.
A: ALGORITHM: Following is the algorithm which can be used for finding the table of the number taken as…
Step by step
Solved in 4 steps with 3 images
- You will be given a square chess board with one queen and a number of obstacles placed on it. Determine how many squares the queen can attack. A queen is standing on an chessboard. The chess board's rows are numbered from to , going from bottom to top. Its columns are numbered from to , going from left to right. Each square is referenced by a tuple, , describing the row, , and column, , where the square is located. The queen is standing at position . In a single move, she can attack any square in any of the eight directions (left, right, up, down, and the four diagonals). In the diagram below, the green circles denote all the cells the queen can attack from : There are obstacles on the chessboard, each preventing the queen from attacking any square beyond it on that path. For example, an obstacle at location in the diagram above prevents the queen from attacking cells , , and : Given the queen's position and the locations of all the obstacles, find and print the number of…A hungry mouse wants to eat all four fruits in a maze such as the one below, in as few moves as possible.. At each turn the mouse can move any number of squares in one of the directions up, down, left or right, but it is not allowed to enter (or jump over) any walls (i.e., the black squares). Thus, the mouse moves just like a rook in chess. To eat a fruit, the mouse has to stop at that square. Assume that the maze has 4 fruits, and the size of b xh squares. 1. Give a suitable representatión of the states in this searching problem. 2. How many possible actions can the mouse perform at each move? (1.e., what is the branching factor?)Note: Answer the question using Java language only. Shaker is the first child who got scholarship into the village. He went to London to study where he finds it very interesting to calculate number of ways of going to point (c, d) from point (a, b) in co-ordinate plane. We can take horizontal and vertical steps only and cannot visit at a point twice. In a step, you can move one unit only. We have to reach to the point (c, d) from the point (a, b) using abs(a-c) + abs(b-d) steps only. Shaker has two sets of points. Set A contains points having X co- ordinate 0 and Y co-ordinates varying from 1 to N (both inclusive). Set B contains points having X co-ordinate K and Y co-ordinates varying from 1 to N (both inclusive). Both sets contain N number of integral points. He wants to calculate the sum of number of ways to going to each point of set B from each point of set A. Input 1 22 Output 8
- The puzzle called the Towers of Hanoi consists of three pegs, one of which contains several rings stacked in order of descending diameter from bottom to top. The problem is to move the stack of rings to another peg. You are allowed to move only one ring at a time, and at no time is a ring to be placed on top of a smaller one. Observe that if the puzzle involved only one ring, it would be extremely easy. Moreover, when faced with the problem of moving several rings, if you could move all but the largest ring to another peg, the largest ring could then be placed on the third peg, and then the problem would be to move the remaining rings on top of it. Using this observation, develop a recursive algorithm for solving the Towers of Hanoi puzzle for an arbitrary number of rings.This is for a Java Progrsm problem but If you could fully explain it to me then I should be okay to try to create this program based off your explaination. Thank you! Trigonometry is needed A pipe is to be carried around a right-angled corner of two intersecting corridors. Suppose that the widths of the two intersecting corridors are 5 feet and 8 feet. Your objective is to find the length of the lingest pipe, rounded to the nearest foot, that can be carried level around the right-angled corner. What I have to do is the following: Write a program that prompts the user to input the widths of both the hallways/ The program then outputs the length of the longest pipe, rounded to the nearest foot, that can be carried level around the right-angled cprner. Note that the length of the pipe os goven by l = AB + BC = 8 /SIN 0 (Omega) + 5 / cos 0(Omega), where 0 < > Omega < pi/ 2Please answer this only in python Alice and Bob play a game. At first, there is only one tree with roots. The players take turns, Alice begins. At one point, Alice has to pick up any empty underground tree roots (or shrubs) and remove them. Bob, on the other hand, has to pick out any part of the empty leaves and remove them from the tree (or trees). (Please note that Bob always takes some depth from the leaves of the first tree.) It is not allowed to skip the turn. The game ends when the player is unable to take a chance. Alice's goal is to reduce the number of turns made by both players, while Bob wants the number to be greater. Considering that they both played very well, how many turns did they make last. Input 1 2 12 Output 2
- Please help me Josephus Problem is a theoretical problem related to a certain counting-out game. On thiscase, people are standing in a circle waiting to be executed. After a specified number ofpeople are skipped, the next person is executed. The procedure is repeated with theremaining people, starting with the next person, going in the same direction and skippingthe same number of people, until one person remains, and is freed.Arrange the numbers 1 , 2, 3 , ... consecutively (say, clockwise) in a circle. Now removenumber 2 and proceed clockwise by removing every other number, among those thatremain, until one number is left. (a) Let denote the final number which remains. Find formula for .(b) If there are 70 people, what is the safe number (the number that remains)?A tile of a monkey puzzle has four monkey halves that can be labelled as north(N), east (E), south (S), and west (W) half. In addition to the shape of the borderrectangle, these halves determine which edges can be placed next one other. There isalso another way to define how the tiles can be placed: Each tile corner (i.e. compassdirections NE, SE, SW, and NW) has a monkey quarter. If we abstract this quarter, forexample, with a letter, only the tiles with the same letter in their touching corners canbe adjacent. illustrates one valid solution for this quarter monkey puzzle.Are the two monkey puzzle representations equivalent in the sense that if we have apile of ‘half monkey’ tiles H, it is possible to define a pile of ‘quarter monkey’ tilesQ that gives exactly the same set of solutions for the puzzle (and vice versa)?Computer Science There is an n × n grid of squares. Each square is either special, or has a positive integer costassigned to it. No square on the border of the grid is special.A set of squares S is said to be good if it does not contain any special squares and, starting fromany special square, you cannot reach a square on the border of the grid by performing up, down,left and right moves without entering a cell belonging to S. 5 3 4 9 4 X 3 6 1 9 X 4 1 2 3 5 - Design an algorithm which receives an arbitrary n × n grid, runs in time poly-nomial in n and determines a good set of squares with minimum total cost.
- Computer science. Correct answer will be upvoted else downvoted. You have an at first void cauldron, and you need to blend an elixir in it. The elixir comprises of two fixings: enchantment pith and water. The elixir you need to blend ought to contain precisely k % sorcery substance and (100−k) % water. In one stage, you can pour possibly one liter of sorcery pith or one liter of water into the cauldron. What is the base number of steps to mix a mixture? You couldn't care less with regards to the complete volume of the elixir, just with regards to the proportion between sorcery substance and water in it. A little update: in the event that you pour e liters of embodiment and w liters of water (e+w>0) into the cauldron, then, at that point, it contains ee+w⋅100 % (without adjusting) sorcery substance and we+w⋅100 % water. Input The primary line contains the single t (1≤t≤100) — the number of experiments. The sole line of each experiment contains a solitary integer k…When faced with a difficult problem in mathematics, it often helps to draw a picture. If the problem involves a discrete collection of interrelated objects, it is natural to sketch the objects and draw lines between them to indicate the relationships. A graph (composed of dots called vertices connected by lines or curves called edges) is the mathematical version of such a sketch. The edges of a graph may have arrows on them; in this case, the graph is called a directed graph. When we draw a graph, it doesn’t really matter where we put the vertices or whether we draw the edges as curved or straight; rather, what matters is whether or not two given vertices are connected by an edge (or edges). The degree of a vertex is the number of edges incident to it (i.e., the number of times an edge touches it). This is different than the number of edges touching it, because an edge my form a loop; for instance, vertex ? in graph ? (above) has degree 5. In a directed graph, we can speak of the…When faced with a difficult problem in mathematics, it often helps to draw a picture. If the problem involves a discrete collection of interrelated objects, it is natural to sketch the objects and draw lines between them to indicate the relationships. A graph (composed of dots called vertices connected by lines or curves called edges) is the mathematical version of such a sketch. The edges of a graph may have arrows on them; in this case, the graph is called a directed graph. When we draw a graph, it doesn’t really matter where we put the vertices or whether we draw the edges as curved or straight; rather, what matters is whether or not two given vertices are connected by an edge (or edges). The degree of a vertex is the number of edges incident to it (i.e., the number of times an edge touches it). This is different than the number of edges touching it, because an edge my form a loop; for instance, vertex ? in graph ? (above) has degree 5. In a directed graph, we can speak of the…