Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

class Student:

  # Constructor

  def _init_(self):

    self.id_number = 0

    self.grades_list = []

    self.grades_total = 0



Given a string on one line, output the length of that string. End with a newline.

Ex: If the input is:

Fuzzy bear

the output is: 10


Appliance and TV

by CodeChum Admin

Create a class called Appliance. An appliance simply has a:

  • brand (a text)
  • a cost (a monetary value)
  • a power status (ON or OFF)

Power status, brand and cost should not be accessible out the class or its hierarchy of inheritance


Write a c++ program to find the length of the skirting board.Where she wants to replace the old skirting board and the coving 2.7,4.1m 32m(All dimensions in Meter)with the door of 0.86 x 2.06meters

Read from the user the maximum number of rolls of toilet paper that may be ordered. Require the maximum number of rools that may be ordered to be an integer from 1 to 10, inclusive. If the user enters a number that is out of range, make them try again until they enter an acceptable number.

Similarly make the user enter the price of one roll of toilet paper as a decimal number of dollars and cents from ten cents(0.10) to three dollars(3.00) inclusive.

Print a table showing the number of rolls in the table for all number of rolls from 1 to the maximum number that the user specified. Each row in the table shows the number of rolls and the price for that number of rolls.

Example:

User enters maximum number of rolls as 48; make them try again.

User enters maximum number of rolls as 4; that is acceptable.

User enters the price per roll as 14.10; make them try again.

User enters the price per roll as -2.70; make them try again.

User enters the price per roll as 0.10; which is acceptable.

Print:






Prompt the user to input two integers: firstNum and secondNum note that firstNum


Print "userNum1 is negative." if userNum1 is less than 0. End with newline.

Assign userNum2 with 1 if userNum2 is greater than 10. Otherwise, print "userNum2 is less than or equal to 10.". End with newline.


Maximum Profit


You given a list of prices where prices[i] is the price of a given stock o the i th day write a program to print the maximum profit by choosing a single day to buy a stock and choosing a different day in the future to sell that stock if these is no profit that can be achieved return 0

INPUT

The input is a single line containing space seperated integers.


OUTPUT

The output should be an integer.


Explanation

in the example the given prices are 7 1 5 3 6 4

buying stocks on day two having price 1 and selling them on the fifth day having price 6 would give the maximum profit which is 6 - 1

so the output should be 5.


sample input 1

7 1 5 3 6 4

sample output 1

5


sample input 2

1 11 13 21 19

sample output 2

20


String Concatenation


Disha has three strings A, B, and C consisting of lowercase letters.She also has a string T consisting only of characters 1, 2 and 3.

She wants to concatenate the three strings according to the characters in T.

Your task is to print the final output string.


Note: Formally, follow the below instructions:

* For each integer i such that 1<=i<=|T|, let the string si be defined as follows:

  • A if Ti = 1.
  • B if Ti = 2.
  • C if Ti = 3.

*Concatenate the strings s1,s2,...,s|T| in this order and print the resulting string.


Sample Input1

mari

to

zzo

1321


Sample Output1

marizzotomari


Number Game


A group of people are playing a game.They are standing and each carring a card with a number on it.These numbers in the list A. A random number S iis selected.


Find out the new list of numbers after

  • S people were removed from the left.
  • S people were removed from the right.


Sample Input1

1,2,3

1

Sample Output1

2 3

1 2


LATEST TUTORIALS
APPROVED BY CLIENTS