1,245 Answered Questions for the topic computer programming

Computer Programming Java Computer Science Data Science


Complete Binary Tree in Java (ArrayList implementation)

inOrder, postOrder, and preOrder seem to be printing extra numbers. Why is this happening? import java.util.*;public class CBT{  private ArrayList tree;  public CBT(){ tree = new... more
Computer Programming


Write pseudocode to design a programming solution by outlining a series of steps and using appropriate indentation and keywords.

Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40... more
Computer Programming Algebra 2 Sat Math Computer Science


Math Conversion

The drainage basin of the Delaware River encompasses about 35,500 km^2 (= 35 x 109 m^2). The average annual precipitation for the drainage area is about 44 inches/year (= ~1.1 m/yr) and the... more
Computer Programming Computer Science


How do you count characters in a string in assembly language

I am currently working on a lab for my cs class. Part of the lab is asking for us to make a function that counts the length of a file. The file has a long string inside of it and we need to count... more
Computer Programming


Multiple If statements. Printing Car Features.

Write multiple if statements. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably has seat belts." If 1990 or later, print "Probably has antilock brakes."... more
Computer Programming C++ Computer Science


C++ Array of Bank accounts & Ask user to sort by name, id or balance.

C++ question: I have a BankAccount class that has private member variables, string name, string id, and int balance. I made an array of 5 Bank Account objects that stored different names, bank... more
Computer Programming Computer Computer Science Python


Write a program that first invites the user to input a natural number n. Then compute the nth number in the sequence (x subscript n) and display it appropriately to the user.

The sequence xn is defined, for n > 2, by the recursive formulaxn = 2xn - 1 + xn - 2 where x1 = 2 and x2 = 3.Write a program that first invites the user to input a natural number n. Then compute... more
Computer Programming Computer Science Python


How do I approach this programming prompt?

================================= An ordering service allows customers to order filled breads. The bread comes in two sizes: -30cm -15cm And three types: -White -Brown -Seeded There are five... more
Computer Programming C++ Computer Science


I need help with this HW assignment: Project 2: Functional Decomposition II - Math Skill Builder!!!

Computer Programming Computer Science


Computer Science

Assign number_segments with phone_number split by the hyphens.Sample output with input: '977-555-3221'Area code: 977
Computer Programming Computer Science


In python Coding

Complete the function game, which simulates a simple, turn-based game between two players and returns the winner (if there is one).The function takes four arguments:m1 and m2 are strings... more
Computer Programming C++


C++ Programming - Sum of two Numbers

Sum of Two NumbersWrite a program that stores the integers 50 and 100 in variables, and stores the sum of these two in a variable named total.
Computer Programming C++


Introduction to C++ Programming

Write pseudocode to create a detailed program of one of your daily regular activities like studying and family time.
Computer Programming C++ Css


Can someone help me write a css code

Hi there! I want CSS code for my website. The website has themes that are already made, and we can change text, add products, and so on. The website also provides a CSS editor, like Square Space... more
Computer Programming Computer Science Python


Given a positive integer n, greater than 1, assign True to is_prime if n has no factors other than 1 and itself. (Remember, m is a factor of n if m divides n evenly.)

Given a positive integer n, greater than 1, assign True to is_prime if n has no factors other than 1 and itself. (Remember, m is a factor of n if m divides n evenly.)Additional Notes: n should not... more
Computer Programming Math Science Biology


Coriolis Effect Question

Would an airplane flying from Fort Lauderdale, FL to Chicago, IL appear to be deflected left or right as it flies?AndWhich way would a ship from Melbourne, Australia going to Santiago Chile be... more
Computer Programming Html Php


comparing php array in while loop

I'm trying to get this while loop to compare the users selection in $brandSel which is assigned via a comboboxto an array value $phoneBrand which is assigned from reading out a text file. But it... more
Computer Programming Computer Java C++


i need help please

Newton's law of cooling.dT/dt=−K(T−Ta)Resolve this ODE using the scipy library.
Computer Programming C++ Computer Science


Help with 4.28 LAB*: Program: Drawing a half arrow C++

Write a program that outputs a downwards facing arrow composed of a rectangle and a right triangle. Arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow... more
Computer Programming C Computer Science


Minimax algorithm for tic tac toe in C

I have made a basic tic tac toe game which fills the board with X's and O's and checks for a winner/draw. How can I implement the minimax algorithm to 1) check for the next best move when the game... more
Computer Programming


Programming Makefiles

How to modify these makefiles to have 5 targets and run them in linux? make -s -f makefile.your_name option_1make -s -f makefile.your_name option_2make -s -f makefile.your_name option_3make -s -f... more
Computer Programming Java


Methods with loops are destroying my brain, help!

Define the method printValues() that takes two integer parameters and outputs all integers starting with the first and ending with the second parameter in reverse order, each followed by a newline.... more


general coding question

What is the difference between int[] and int[][] when using an array in java?thanks


Help needed with understanding a problem

Given int[][] myVals ={{2, 4, 6, 8}, {20, 40, 60, 80}};Using the above 2d vector, what is the value of myVals[1][2]?The answer is 60. Can someone explain to me why?Thanks

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.