When I do run it only shows me one line, what am I doing wrong? I have tried several times.
Q: Write a program that keep asking for a number until you enter a negative number. At the end, print…
A: all the steps as well as logic I explained in the comment of the program also add the screenshots of…
Q: Write a program that will print a rectangle outline. Read a height and width from the user and print…
A: #include<iostream>using namespace std;//method to print rectangle outline//takes height and…
Q: Use the compareTo method to write code that reads two names from the console and prints the one that…
A: The compareTo() method is used for string handling in which it compares two strings…
Q: The method for debugging has been executed, however the issue has not been fixed. What options do…
A: Institution: No one solution fits everyone, as we all know. approach to fixing every fault in your…
Q: Write a program that converts temperatures from Fahrenheit to Celsius.
A: #include<stdio.h> int main() { float Fahrenheit,…
Q: (b) Write a program that produces a triangular grid of numbers as a seating chart (start at 1 in the…
A: C++ code for given problem Statement- #include <iostream>using namespace std;//main methodint…
Q: What is the output of the following sequence of loops? Notice that the code is the same as that in…
A: Here one iteration of j, the k loop will run from k=1 to 4 and for one iteration of i loop the j…
Q: A square is divided into four smaller regions as shown below in (a). If you throw a dart into the…
A: Java program for the above problem: public class Montecarlo{ public static void main (String []…
Q: / ** Convert from feet to meters */ public static double footToMeter (double foot) /** Convert from…
A: PROGRAM CODE: public class Main { /** Main Method */ public static void main(String[] args) { //…
Q: Jinnie has 10 numbers and she wants to write a program that prints a random number in the output…
A: logic to generate random number: min = Math.ceil(min); max = Math.floor(max); return…
Q: Change your previous temperature conversion program so that it will converts the temperatures from 1…
A: As per the requirement program is developed. Note: In the question programming language is not…
Q: Write a program that shows that the square of the normal is χ2
A: Given To know about the programming and program of square of number.
Q: Write a program that asks the user to type the coordinate of 2 points, A and B (in a plane), and…
A: Note :-You have not mention the language of the program, so i'm answering your question in C++. Your…
Q: | You can use the scatter function to plot a single point or a set of points on a figure. In this…
A: t = linspace(0,2*pi,100)'; circsx = r.*cos(t) + x; circsy = r.*sin(t) + y; plot(circsx,circsy);
Q: For the first part of you will write a program similar to the classic Guess My Number game. To start…
A: First we import random module using import random Now we use the randit function of random module…
Q: 3) Write a program that reads an integer and prints how many digits it has by checking whether the…
A: Python program to solve the given problem is below.
Q: What is the total number of iterations in the following loop ? for(int i=0; i<9; i+=2);
A: Here the loop will run from i=0 and will keep on iterating until the condition i<9 is met. The…
Q: Use the dot method to add the numbers below. If the number needs a dot, put a dot (period) to the…
A: Steps:- Add numbers and keep single digit sum. Wherever addition gives two digit result put a dot…
Q: write a program that determines the type of triangle (scalene, isosceles, or equilateral)
A: Start input three sides according to condition print the type of triangle stop
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: According to the Question below the solution: Output:
Q: Write a program that asks the user to input the radius of a circle and calculates its area
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: A robot is initially located at position (0, 0) in a grid [−5, 5] × [−5, 5]. The robot can move…
A: Program code: //include the required header files #include <iostream> /* srand, rand */…
Q: Write a program that asks the user for the radius of a circle, and depending on the user's choice,…
A: #include<iostream> using namespace std; int main(){ float…
Q: Write a program to get a random number between 1 and 100, use the button to check whether the given…
A: write a program to get random number between 1 and 100......
Q: Write a program with loops that will draw a right triangle in the following shape. ** *** **** ** **
A: Given: Java
Q: Write a program that accepts two numbers by the user, checks if the denominator iszero, divides them…
A: As the programming language is not mentioned the following code is in c code: #include…
Q: The current challenge when I try run this code it doesn't give me the desired output like it's…
A: The resultant python program to get the desired output is: Source code: import math num =…
Q: Write a method called fourTails that flips a coin randomly until the results of the coin are four…
A: The random numbers can be generated and you can assign characters to that values
Q: Suppose you have this code, if we run it, will it work properly or is there an error in it? If not;…
A: Please find the answer below :
Q: You have to write a program to find the largest number and its place. For example, if the values are…
A: The following are steps needs to be taken for the given Python program: In the function, findMax()…
Q: Exercise • Write a program that asks the user -Do you want to use this program? (y/n) • If the user…
A: Code: #include <iostream> using namespace std; int main(){ string c="y"; int count=1;…
Q: ** Below is the image of my code so far, but it still needs work** * This program asks the user…
A: PROGRAM: import java.util.Scanner; //Create a class class Main{ //Define main() method…
Q: Write a program that displays the following pattern on the screen: * *** ***** *******
A: Given: Write a program that displays the following pattern on the screen: * *** ***** *******
Q: write a program that asks the user to enter an angle in degrees and prints out the sine of that…
A: We need to write a program that takes input of an angle from user in degrees and print the sine of…
Q: program alculate the area for each one and count how many circles have the nteger part of the area…
A: # include<stdio.h> # include<conio.h> int main() { double radius, area; int…
Q: Write a program that prompts the user to enter the side of a pentagon and displays the area. Here is…
A: START Enter the value of s as side of pentagon calculate area as "( 5 * s * s) / (4 * tan((pi) /…
Q: Written In Python The amount of time students spent studying for an test is exponentially…
A: According to the information given:- We have to write python code by following the instruction and…
Q: can you please show me how exactly i should change the code in order for it to run?
A: Here in the function wordtomorse(), we have a set named Mcode. Next, we have iterated over the…
Q: How would I write some code that would find the average of a random set of temperatures? I already…
A: <?php $month_temp = "78, 60, 62, 68, 71, 68, 73, 85, 66, 64, 76, 63, 81, 76, 73, 68, 72, 73, 75,…
Q: In the following code stream, identify if there are any hazards. Crisply describe if it is possible…
A: About hazards: Structural hazards: it means that hardware cannot support the combination of…
Q: The program you write has to be something similar to this program, except that this program is for…
A: Please upvote. I don't exactly get what does "similar to this program" means here in this…
Q: Given the enum below, write Kotlin code that will either output "Primary Color", or "Secondary…
A: Algorithm: Create a main function Prompt to input color from the user Check if the input color is…
Q: In this assignment, you will create a very particular calculator that works with up to 3 integer…
A:
Q: Write a program that asks the user for an animal sound, then prints out that sound twice on the same…
A: the answer is given below:-
Q: Write a program that prints out the name of my favourite dinosaur, Tyrannosaurus Rex: Tyrannosaurus…
A: As given, I need to write a Python program that prints the name of a dinosaur, Tyrannosaurus Rex. I…
Q: For Homework, Create a Program that draws from a deck of 52 cards For those who do not know a deck…
A: I have implemented the code as per the specifications. The code is as follows:…
When I do run it only shows me one line, what am I doing wrong? I have tried several times.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Has anyone figured this out cause explanation makes no sense
- Course: Data Structure and Algorithms: Language: Java Please solve problem completely according to requirement, program should must be follow all the rules of menu base system which are required and write in question: Attach the output's screentshots and explain every line with comments: Whole code should be user defined inputs not fix: Task : Address Book (List)• Your program will be a menu driven program. Address book will be implemented using the ArrayList.Description: We want to build an address book that is capable of storing name, address & phone number of a person. Address book provides functionality in the form of a menu. The feature list includes:• Add – to add a new person record• Delete – to delete an existing person record by name• Search – to search a person record by name· Exit – to exit from applicationHow can race conditions occur in a multithreaded program, and what techniques can be employed to prevent or resolve them?Create the following operations and include a menu-driven main program that will demonstrate your operations. The program will only stop when the user chooses 5 Exit Program. Create Grapha. Adjacency List (Programmer2)b. Adjacency Matrix (Programmer2) Traversal (User will input the source / start)a. BFS (Lead Programmer)b. DFS (Lead Programmer) Find Path (Given source and destination) (Programmer2) Path Cost (Given source and destination) (Lead Programmer) Exit Program (Programmer1) Main Program (Programmer1)Make necessary changes to this given codesMain.cpp #include <iostream>#include "Data.h"using namespace std; int main(){int ch;Graph g(8);cout << "Graph Operations" << endl;cout << "[1] Adjacency List" << endl;cout << "[2] Adjacency Matrix" << endl;cout << "Enter choice: ";cin >> ch;if (ch == 1){g.addEdge(0, 6);g.addEdge(1, 5);g.addEdge(2, 0);g.addEdge(2, 4);g.addEdge(3, 5);g.addEdge(4, 1);g.addEdge(4, 3);g.addEdge(5,…
- PYTHON Q9: Assignment statements, such as x = 3, define variables in programs. To execute one in an environment diagram, record the variable name and the value: Evaluate the expression on the right side of the = sign Write the variable name and the expression's value in the current frame. Use these rules to draw a simple diagram for the assignment statements below. x = 10 % 4 y = x x **= 2Suppose you works in a library and have the id’s of 12 books as follows 2345 , 125 , 85 , 969 , 789 , 12 , 487 , 66 , 4556 , 48 , 7987 , 412 If you need to made a simple program a) Which data Structure will you chose in order to store these Book ID’s ? Justify your answer b) Does the physical arrangement of books and data structure you chose to store book ID’s have any link with each other? Chose either YES or NO and Give reason why your answer is YES and give reason if your answer is NO c) Write a C/C++ program that saves above ID’s in your chosen data structure d) [Connected with part c] Take integer value as an input that searches from values present in data structure and give output “FOUND” if value matches and, “ DID NOT FOUND” if value didn’t matches, Discuss the searching technique you used with reason Example: Input value: 125 Output: Found Input value: 9 Output: Not FoundCreate the following operations and include a menu-driven main program that will demonstrate your operations. The program will only stop when the user chooses 5 Exit Program. Create Grapha. Adjacency List (Programmer2)b. Adjacency Matrix (Programmer2) Traversal (User will input the source / start)a. BFS (Lead Programmer)b. DFS (Lead Programmer) Find Path (Given source and destination) (Programmer2) Path Cost (Given source and destination) (Lead Programmer) Exit Program (Programmer1) Main Program (Programmer1)
- computing-related study In your opinion, what are the benefits and drawbacks of passing by value vs passing by reference?Question 2 I need help with ii below This question provides an opportunity for you to demonstrate your understanding of the problem-solving approach taught in TM112 and the patterns introduced in Block 1 Part 4 and Block 2 Part 2. You can find an overview of the problem-solving approach and a list of all the patterns TM112 teaches in the Problem solving and Python quick reference and you will need to refer to this document as you work on the question. Important note: you do not need to get a working program in part a. in order to attempt part b. A student wants to design and implement a Python program to convert any 6-bit unsigned binary number to its decimal equivalent. There are many ways of doing this, but here is their initial top-level decomposition: > Convert binary to decimal >> Input a list of six 1s and 0s corresponding to the binary number to be converted >> Input a list of six column weightings consisting of powers of two >> Create a new list…Query Board Python or Java(Preferred Python please) Thank you! Programming challenge description: There is a board (matrix). Every cell of the board contains one integer, which is 0 initially.The following operations can be applied to the Query Board:SetRow i x: change all values in the cells on row "i" to value "x".SetCol j x: change all values in the cells on column "j" to value "x".QueryRow i: output the sum of values on row "i".QueryCol j: output the sum of values on column "j".The board's dimensions are 256x256."i" and "j" are integers from 0 to 255."x" is an integer from 0 to 31. Input: Your program should read lines from standard input. Each line contains one of the above operations. Output: For each query, output the result of the query. Test 1 Test InputDownload Test 1 Input SetCol 32 20 SetRow 15 7 SetRow 16 31 QueryCol 32 SetCol 2 14 QueryRow 10 Expected OutputDownload Test 1 Input 5118 34
- Deeper access is better from a programming perspective than shallower access; avoid making a judgment only on the basis of performance.Multiple input parameters with PrintInt subprogramWhen printing an integer value, the program always printed a string first to tell the user what wasbeing printed, and then the integer was printed. This behavior will be abstracted in the followingsubprogram, PrintInt. In this subprogram there are two input parameters: the address of thestring to print, which is stored in $a0; and the integer value to print, which is stored in $a1.Other than passing in two parameters and creating a slightly larger subprogram, this programdoes not add any new material that needs a commentary section.Create the following operations and include a menu-driven main program that will demonstrate your operations. The program will only stop when the user chooses 5 Exit Program. Create Grapha. Adjacency List (Programmer2)b. Adjacency Matrix (Programmer2) Traversal (User will input the source / start)a. BFS (Lead Programmer)b. DFS (Lead Programmer) Find Path (Given source and destination) (Programmer2) Path Cost (Given source and destination) (Lead Programmer) Exit Program (Programmer1) Main Program (Programmer1) NOTE: Users will input name of places as string and your program will do the manipulation to convert it to an integer vertex. Also, you will have to convert integer vertex back to string when displaying back output to users. Cost will the basis on what vertex to take in BFS and DFS. Cost will only be displayed in option 4.