158 Answered Questions for the topic Coding
06/07/20
I am having difficulty on why my program cannot be outputted. Can you please tell me where I did wrong. My code is pasted below.
import hsa.Console;import java.awt.*;import java.io.*;import java.util.*;public class HangMan{ static Console c; public static void main (String []args) throws IOException { // Main Method. ...
more
06/07/20
I need to have a functional code that can do the following requirements. My game is hangman. My question is that I don't what to start.
I need a functional program that has all the requirements:Final Programming Assignment.For the selected game, my program must provide the following features: • Player vs Computer format. • A game...
more
How do you find the question mark for the part of the force exerted on the stone? The answer should include other variables
ball = sphere ( pos=vec(-2,1,0 ), m = 0.5 , alpha = 0*pi/180,#alpha = angle radius=0.02, color=color.red, make_trail=True, trail_type='points') #,interval=50,retain=50)ball.v = vec( 1,...
more
05/25/20
I can't make a my character move when I run my javascript (Intellij), what is wrong with my code?
package movement;
import processing.core.PApplet;
import processing.core.PImage;
public class LunasAdventures extends PApplet {
PImage moth;
PImage bg;
public static void...
more
05/01/20
Any java expert who knows the corecct answers for these?
Q1:charAt() is used to obtain a character at specified index?a)Trueb)FalesQ2:The java program is enclosed in a class definition ?a)Trueb)FalesQ3:The for loop repeats a set of statements a certain...
more
04/29/20
Plz help whats the correct answers for these java questions?(part2) ASAP!!
Q21:float is the type that denotes floating-point numbers that can have fractional parts?a)Trueb)FalesQ22:instance variables that are numbers are initialized to null default value?a)Trueb)FalesQ23:...
more
04/27/20
Online shopping cart
(1) Create three files to submit:
ItemToPurchase.h - Class declaration
ItemToPurchase.cpp - Class definition
main.cpp - main() function
Build the ItemToPurchase class with the following...
more
04/22/20
C++ code on odd and even number using vector
Create 2 Vectors using the For StatementVector 1 = will have ODD numbers from 1 to 99➔vec1 – vector nameVector 2 = will have EVEN numbers from 2 to 100➔vec2 – vector namePrint Vector 1 & 2 from...
more
04/17/20
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles.
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:
Min miles: -10
Max miles:...
more
04/17/20
Write a loop that subtracts 1 from each element in lowerScores if the original element was greater than 0, and otherwise just assigns the element with 0.
Write a loop that subtracts 1 from each element in lowerScores if the original element was greater than 0, and otherwise just assigns the element with 0. Ex: lowerScores = {5, 0, 2, -3} becomes {4,...
more
04/17/20
Write a program that first gets a list of integers from input.
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. That list is followed by two more integers...
more
04/17/20
Write a program that reads a list of words. Then, the program outputs those words and their frequencies.
Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with an integer indicating the number of words that follow. Assume that the...
more
04/17/20
Write a program that reads a list of integers, and outputs those integers in reverse.
Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicating the number of integers that follow. For coding simplicity, follow...
more
Coding Javascript
04/16/20
JavaScript Averages in Arrays
I was doing an assignment and then I was stuck in this part of the question.How do use the function in javascript to generate the array using the parameters??Instructions:Given the following...
more
Coding Javascript
04/16/20
JavaScript functions
This is not really the question. But what would the template look like for something like this so that I can apply to questions??Write some code to do the following:
Write a function theMean that...
more
04/12/20
Assign numMatches with the number of elements in userValues that equal matchValue.
Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If userValues is {2, 2, 1, 2} and matchValue is 2 , then numMatches should...
more
04/12/20
Write a for loop to populate vector userGuesses with NUM_GUESSES integers.
Write a for loop to populate vector userGuesses with NUM_GUESSES integers. Read integers using cin. Ex: If NUM_GUESSES is 3 and user enters 9 5 2, then userGuesses is {9, 5, 2}.#include...
more
04/12/20
Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order.
Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input begins with an integer indicating the number of integers that...
more
04/12/20
Given a sorted list of integers, output the middle integer. Assume the number of integers is always odd.
Given a sorted list of integers, output the middle integer. Assume the number of integers is always odd.Ex: If the input is:
2 3 4 8 11 -1 (a negative indicates the end), the output is:4The maximum...
more
04/12/20
Write a program that first gets a list of integers from input.
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which...
more
04/12/20
Output each floating-point value with two digits after the decimal point, which can be achieved by executing cout << fixed << setprecision(2); once before all other cout statements.
Output each floating-point value with two digits after the decimal point, which can be achieved by executingcout << fixed << setprecision(2); once before all other cout statements.(1)...
more
Coding Computer Science
04/08/20
I need help creating a wins dictionary and a losses dictionary to keep track if the number of games won or lost for a particular number of rolls.
I can provide the code i have already
04/06/20
Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes
Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes:"Hello! I'm Miley! Nice to meet you!"#include <iostream>#include...
more
Write a C++ Program that works in this way.
1. Define a C++ function with the name evaluateBook. The function receives as one argument the name of the file to be processed (i.e., the book's file). So that if you pass the...
more
04/04/20
I need help fixing my program??
#include <iostream>#include <vector>#include <cstring>#include <string>using namespace std;#define MAX_WORD_LENGTH (255)typedef struct _TSynonym{ char...
more
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.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.