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

Assignment 1


Write a program in Java that returns the maximum for three numbers


Assignment 2

Based on Assignment 1, write an algorithm for your implementation



Create a sample (Java) program that displays the sum of integers from 1 to 50.


The internet and world wide web (WWW) represent networks. - true or false


Write functions to swap the contents of two variables where the variables are passed in the function: a) by value; b) by reference, and c) using pointers.


Write a function that can compare two strings in a manner that the function strcmp() does. Do not use strcmp() or any other library function.


Write a function that can compare two strings in a manner that the function strcmp() does. Do not use strcmp() or any other library function.




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.

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

An explanation of your choice for what to call for input of zero.

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.


You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales.

Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.

Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.

Formula to convert from Kelvin K to Celsius C is C = K - 273.

Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively.

The input contains the temperature (a number) and the unit of the temperature scale (C, F, K) without any space.

The output contains temperature in Celsius, Fahrenheit and Kelvin scales in each line in the format similar to input and the value of the temperature is rounded to 2 decimal places.


Given a string of length N, made up of only uppercase characters 'R' and 'G', where 'R' stands for Red and 'G' stands for Green. Find out the minimum number of characters you need to change to make the whole string of the same colour.


Temperature Conversion

You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales.

Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.

Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.

Formula to convert from Kelvin K to Celsius C is C = K - 273.

Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively.

The input contains the temperature (a number) and the unit of the temperature scale (C, F, K) without any space.

The output contains temperature in Celsius, Fahrenheit and Kelvin scales in each line in the format similar to input and the value of the temperature is rounded to 2 decimal places.


Input


The first line of the input contain a temperature Value in one of Celsius, Fahrenheit, and Kelvin scales.


Output


The first line of output should contain the Celsius value and the unit of the Celsius without any space.

The second line of output should contain the Fahrenheit value and the unit of the Fahrenheit without any space.

The third line of output should contain the Kelvin value and the unit of the Kelvin without any space.


Explanation


For example, if the given temperature Value is 25C then Celsius value is 25.0C, Fahrenheit value is 77.0F, and Kelvin value is 298.0K.


LATEST TUTORIALS
APPROVED BY CLIENTS