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 program that asks the user to enter two integers, obtains the numbers from the user, then prints the larger number followed by the words "is larger." If the numbers are equal, print the message "These numbers are equal."


Write a function called Findoutput. The function takes a 4 digits integer as parameter validates the integer and returns 0 when the digits are in increasing order or 1 when the digits are in decreasing order or 99 when the digit are not in any order


2. Write your own unique Python program that has a runtime error. Do not copy the program from your textbook or the Internet. Provide the following.

The code of your program.
Output demonstrating the runtime error, including the error message.
An explanation of the error message.
An explanation of how to fix the error.


 

The information about a song should include:

Artist name

Title 

Length

Number of likes

 

The data members for SongList should be a head pointer to a linear linked list of Song objects and the number of songs in the list. The songs should be organized by popularities with the most popular song as the first node in the list.

 

This ADT must have public member functions to perform the following:

Constructor - Construct an object and initialize the data members 

Destructor - Release all dynamic memory and reset data members to their zero equivalent value

Add a new song

Edit the number of likes for a song

Display all songs in the list

Display all songs for an artist (in order of popularity)

Remove all songs with fewer than M likes, where M is sent in as an argument

 

The test program needs to first load the test data set from external file at the beginning of the program.





1. Copy the countdown function from below.

def countdown(n):

   if n <= 0:

     print('Blastoff!')

   else:

     print(n)

     countdown(n-1)

Write a new recursive function countup that expects a negative argument and counts “up” from that number. Output from running the function should look something like this:

>>> countup(-3)

-3

-2

-1

Blastoff!

Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)

If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.

Provide the following.

  • Output for the following input: a positive number, a negative number, and zero.

Write a MATLAB program to solve the following integral using

Simpson’s 1/3rd Rule.


I=∫ p0 (ax3+bx2+cx+d) dx=?


Assign suitable values of a, b, c and d.

Also assume suitable values of p and step size h.

Compare your program result with original one.


Apply Trapezoidal Rule, Simpsons 1/3 Rule and Trapezoidal Rule to compute

   a
I=∫   p/q+x^2
   0


Assume: i) the constant “a”- in between 1.1 to 1.5
        ii) the constant “p” – in between 2 to 5.
        iii) the constant “q” – in between 6 to 9.
         iv) the increment “h” – in between 0.025 to 0.1

Let we have to prepare the final result of each student for a particular subject. The final 

marks are sum of marks obtained by the student in T1, T2, T3, P1, P2, and attendance in theory class. Let 

there are following classes: Grade ‘A’ for> 80% marks, ‘B’ for 70 to 80%, ‘C’ for 60 to 70%, D for 50 to 60%, F for <50%.Base on above information, do the following:

(i) Write a function which prints the name and grades of all students in the ascending order of the 

grades. In case of same grade, print all respective names in alphabetical order.

(ii) Write a function which prints the name and grades of all students in the alphabetical order of 

the name of the students.

(iii) Write a function to search the grade of a student based on the first name of the student. In 

case of multiple entries with same name, print all the names with roll number and respective 

grades.


Let we have to prepare the final result of each student for a particular subject. The final 

marks are sum of marks obtained by the student in T1, T2, T3, P1, P2, and attendance in theory class. Let 

there are following classes:(a) Student: Its data members are student name and roll number and member function is to print 

the values of the data members.

(b) T1T2T3: Its data members are marks obtained by a student in T1, T2, and T3 and member 

function is to print the values of the data members.

(c) P1P2: Its data members are marks obtained by a student in P1 and P2 and member function is 

to print the values of the data members.

(d) Attendance: Data member of this class is the percentage of attendance of a student in the 

theory class and member function is to print the values of the data member.

(e) Total: Data members of this class are total marks obtained and the grade secured by a student 

and member function is to print the values of the data members.



1. Copy the countdown function from below.

def countdown(n):

   if n <= 0:

     print('Blastoff!')

   else:

     print(n)

     countdown(n-1)

Write a new recursive function countup that expects a negative argument and counts “up” from that number. Output from running the function should look something like this:

>>> countup(-3)

-3

-2

-1

Blastoff!

Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)

If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.

Provide the following.

  • The code of your program.
LATEST TUTORIALS
APPROVED BY CLIENTS