158 Answered Questions for the topic Coding

Write a program that replaces words in a sentence.

Write a program that replaces words in a sentence. The input begins with an integer indicating the number of word replacement pairs (original and replacement) that follow. The next line of input... more

03/31/20

Counting strings in positional arguments python (order cost calculator problem)

The goal is to calculate the cost of a order at a pizza shop. For example:cost([ ], ["pepperoni"], ["ham", "anchovy], drinks = ["small"])should calculate the price of one plain pizza, one pizza... more

03/30/20

Write a program that removes all spaces from the given input.

Write a program that removes all spaces from the given input.Ex: If the input is:Hello my name is John.the output is:HellomynameisJohn.Your program must define and call the following function. The... more

03/20/20

Conditional Statements In C Programmin

Question 11.Given the following code: switch(x - y) { case 0: return x; case 4: break; case 7: x = x - 1; case 9: return x*y; case 3: default: return y - x; ... more

03/20/20

Logical Operators in C programming

1.Question Is the following expression true or false? -1 * -2 == 14 % 4 TrueFalse2.Question 2Is the following conditional statement true or false? int x = 6; -3 < 5 || !(x % 3 == 0) TrueFalse
Coding C++ C# Programming

03/19/20

Printing Problem in C programming

1.Question For the following code: int a = -1; int b = a * 5; printf("a is %d, and b is %d. ", a, b); What is the output?2.Question int x = -1; int y = 3; x= x + Y; printf("x - y is %d. ", x -... more
Coding C++ C# Programming

03/18/20

What does g(-2, 5) evaluate to?

What does g(-2, 5) evaluate to? int g (int x, int y) { x= x + y; int z = 2 * x + y; return z; }

03/13/20

How do I create a link to a location in a page, when sections are accordion collapsed using CSS?

The page is divided into different categories which can be collapsed (accordion), and using the regular <a href> does not work. That only works when linking to a location in the same section... more
Coding Python

01/22/20

Python Programming Logic Question

A cookie recipe calls for the following ingredients:• 1.5 cups of sugar• 1 cup of butter• 2.75 cups of flourThe recipe produces 48 cookies with this amount of ingredients. Write a programthat asks... more
Coding

01/19/20

c++ programming

Given integers userNum and x, output userNum divided by x four times. If the input is 2000 2, the output is: 1000 500 250 125Note: In C++, integer division discards fractions. Ex: 6 / 4 is 1 (the... more
Coding

01/19/20

C+++ programming

Given integers userNum and x, output userNum divided by x four times. If the input is 2000 2, the output is: 1000 500 250 125Note: In C++, integer division discards fractions. Ex: 6 / 4 is 1 (the... more

Simple Adder HTML JavaScript

Create the form structure shown in Figure 2, below. Write a JavaScript function according to the following requirements. A user should be allowed to enter two numbers in text boxes. When a user... more

JavaScript Form Validation

4. Create the form structure shown in Figure 2, below. Write a JavaScript function according to the following requirements. A user should be allowed to enter his/her Fist name in a text box and... more

CSS - Selecting the first bold word of all paragraphs

write the required external CSS rules for the following : Set the font size and font style , of the first bold word of all the paragraphs in a document into 14px and italic respectively.

JavaScript Form Validation

Question :Create the form structure shown below and write a JavaScript function satisfy the followingrequirements. The Name and the email address are required fields while entering data. Number... more
Coding Javascript

11/13/19

Coding help on Google Docs Add-on

So I'm in the midst of trying to learn code (which I'm kind of bad at). I'm trying to code something to alert me when someone edits a shared google doc. I know that there's this google add-on thing... more

Java String class

So we are given to write the exact output of the following code:class stri123{ public static void main(String[] args) { String name = "University Grants Commission"; boolean sword... more

Java Program / methods

One sales shop offer following discount rates to customers based on their bill value.Bill value Range Discount ratebill value >= 10000 discount 20%bill value >= 5000 disocunt 10%bill value... more

Java Number Patterns

How do we print,_ _ _ _1_ _ _2 1_ _3 2 1_ 4 3 2 1In Java?Please help, I don't know how to get started

Question is in description. About writing a MATLAB code

USING MATLABWrite a program that creates a table showing the conversion from Yen too Pesos. Your program should be able to print a user specified number of lines showing the value of the Yen in one... more
Coding Java Programming

10/12/19

Java - arrays & loops

Question : Write a Java program to read integer data set(size of n<10) into an array and display its data graphically by plotting each numeric value as a bar of asterisks as shown in the... more

How to write a and b as inclusive integers? (python3)

Write a program that takes three integers a, b, and k as command-line arguments writes the integers between a and b (both inclusive), but only k integers per row.I honestly have no idea where to... more
Coding Java Programming

10/03/19

Java Switch Case

How do we write the following code using switch statement ?if(option == 1) vehicle = "Motor Cycle" ;else if(option == 2) vehicle = "Car";else if(option == 3) || (option == 4)vehicle = "Heavy... more

Java Programming

Hi, I'm new to Java. I've been working on this question, wrote the code and checked the results with some examples and it seems to be doing fine. I would be glad if any of the tutors can check the... 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.