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

Write a python function Write_String(fanme, *list)  which take a list containing string elements and write them in a file myfile.txt until the string “finish” (not case sensitive) occur. The function then returns the contents written in file as a string. Before writing list elements in file, you also need to make a separate python function to check whether input list contains "Finish" or not. If not, then it should return error as shown in example.


myfile.txt:

Python

Java

C

C++

Ruby

.Net


 

Example-1

Example-2

Example-3

Input:

myfile.txt

["Python", "Java", "C", "C++", "Finish"]

 

Output:

PythonJavaCC++

 

Input:

myfile.txt

["Python", "Java", "C", "C++", "Finish",".Net", "Rubby"]

 

Output:

PythonJavaCC++Input:


myfile.txt

["Python", "Java", "C", "C++"]

 

Output:


Error: List does not contain Finish

 



WAP in C++ :

  • Defines a structure called ThreeDPoint that represents a point in a 3D space. The point has an x , a y , and a z coordinate.
  • Defines a function getPointData() to accept values of x, y and z coordinates of a point from the user.
  • Defines another function for operator overloading of less than (<) operator. The function compares x coordinates of two structure variables and returns true if that of first one is less than that of second. If both are equal, it compares y coordinates of two structure variables and returns true if that of first one is less than that of second. If they are also equal, it compares z coordinates of two structure variables and returns true if that of first one is less than that of second. For example if input values for two points, say p1 and p2 are (1, 1, 2) and (1, 1, 0) then p1 < p2 returns false and p2 < p1 returns true.
  • Define two variables of the structure ThreeDPoint, namely- p1 and p2 in the main() function and print the smaller of the two points.

Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the value is less than or equal to the second integer. 

Ex: If the input is: 

-15 10

the output is: 

-15 -10 -5 0 5 10

Ex: If the second integer is less than the first as in:

20 5

the output is:

Second integer can't be less than the first.

For coding simplicity, output a space after every integer, including the last.



We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.

Care to do it for me?


Input

A line containing two integers separated by a space.

10·3

Output

A single line containing an integer.

1





Create a program that will use a function, that will perform and display the sum, difference, product, and quotient of 2 numbers. 


Write a c++ program to display the Fibonacci series of the first 50 integer

Binomial births In the U.S., 49% of births are female. Assume the sexes of babies are independent of each other. Find the following probabilities using stats.btnom.pnf, stats, binom.cdf, and arithmetic. The stats library of scipy has been imported in the top cell of this notebook. (a) Find the chance that among 20 births, the majority (more than half) are female. Save your answer in the variable called port


Make a Mortgage Calculator code


Make a Mortgage Calculator Test code


a. (overSpeed > 10) ? fine = 200 : fine = 75;

b. (fuel >= 10) ? drive = 150 : drive = 30;

c. (bill >= 50.00) ? tip = 0.20 : tip = 0.10;

Create a class called Team that will be used for creating team objects, the class must have the

following data members and methods:

Data Members:

 Name,the name of the team

 HomeGround, the name of the Home stadium of the team

 Goals, the number of goals that the team scores during the match

Choose appropriate types for the data members

Methods:

 A default constructor which will initialize all data members to proper initial values

 An overloaded constructor which receives two arguments; a team name and home

ground name and it should also initialize the goals to a proper initial value

 scoreGoals(), since a team can score 0 to 4 goals, this helper method must assign the

Goals data member to a random number in that range

 getName(), getHomeGround(), getGoals(), create get methods for each data member


LATEST TUTORIALS
APPROVED BY CLIENTS