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 an int function cube () that returns the cube of its single int formal

parameter.


Write a float function triangle that computes the area of triangle using its two formal parameters h and w, where h is height and w is the length of bases of triangle?


What happen if you open your excel for the first time?


Write a program to print the right alphabetic triangle up to the given N rows.
Input

The input will be a single line containing a positive integer (N).
Output

The output should be N rows with letters.
Note: There is a space after each letter.
Explanation

For example, if the given number of rows is 4,
your code should print the following pattern.
A 
A B 
A B C 
A B C D

Sample Input 1
4
Sample Output 1
A 
A B 
A B C 
A B C D 

Sample Input 2
6
Sample Output 2
A 
A B 
A B C 
A B C D 
A B C D E 
A B C D E F 
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.
Sample Input 1
25C
Sample Output 1
25.0C
77.0F
298.0K

Sample Input 2
37.5F
Sample Output 2
3.06C
37.5F
276.06K

Write four different Java statements that each add 1 to integer variable x.


State whether each of the following is true or false. If false, explain why. a. An algorithm is a procedure for solving a problem in terms of the actions to execute and the order in which these actions execute.

b. A set of statements contained within a pair of parentheses is called a block. c. A selection statement specifies that an action is to be repeated while some condition remains true.

d. A nested control statement appears in the body of another control statement. e. Java provides the arithmetic compound assignment operators +=, -=, *=, /= and %= for abbreviating assignment expressions.

f. The primitive types (boolean, char, byte, short, int, long, float and double) are portable across only Windows platforms.

g. Specifying the order in which statements (actions) execute in a program is called program control.

h. The unary cast operator (double) creates a temporary integer copy of its operand. i. Instance variables of type boolean are given the value TRue by default. j. Pseudocode helps a programmer think out a program before attempting to write it in a programming language.


1)     Discuss Cyber security in Zambia and measures put in place to combat it.


1)     Give examples ,advantages and disadvantages of

i) Cyber space

ii) Identity theft

iii) Impersonation

ii) Netizens



Part 1


Write a Python program that does the following.


Create a string that is a long series of words separated by spaces. The string is your own creative choice. It can be names, favorite foods, animals, anything. Just make it up yourself. Do not copy the string from another source.


Turn the string into a list of words using split.


Delete three words from the list, but delete each one using a different kind of Python operation.


Sort the list.


Add new words to the list (three or more) using three different kinds of Python operation.


Turn the list of words back into a single string using join.


Print the string.


Part 2


Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.


Nested lists

The “*” operator

List slices

The “+=” operator

A list filter

A list operation that is legal but does the "wrong" thing, not what the programmer expects

Provide the Python code and output for your program and all your examples.


Part 3


Describe your experience so far with peer assessment of Programming Assignments.


How do you feel about the aspect assessments and feedback you have received from your peers?

How do you think your peers feel about the aspect assessments and feedback you provided them?


LATEST TUTORIALS
APPROVED BY CLIENTS