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

Compression Algorithm:

One method of compressing a file is to recognize repeated digits and replace the runs of

repetition with a number representing the repetition length. For instance for a line in you file

such as ;

0110000000000110

Can be represented with the line:

1 2 10 2 1

Because there is 1 zero, 2 ones, 10 zeros, 2 ones and 1 zero. It is already understood that only

zeros and ones appear and that zeros apper first in a given line. Thus storing the new line of

data is much shorter (5 numbers) than the original line (16 numbers)

To decompress the encoded file you can follow the reverse implementation of the method

stated above, for example for the encoded data:

4 2 4 2 4

The decompressed data is:

0000110000110000
How can technology (IT) as a part ofthe broader information system be used to help organizations?
Suppose you have some words and you want to right justify them, that is, align them to

the right. Create a program that reads a word and print it all right justified, in the same

order as they appear in the input.
Explain what is meant by thesyntaxand thesemanticsof a programming language.GiveJava examples to illustrate the difference between asyntax errorand asemantics error.Use different examples than those found in the textbook.
Cyber Security is a key issue to protect our daily documents and applications stored

and submitted in various platforms. Having a robust encryption system to our

generated password is very essential in this perspective. Your task is to create a nice

and smooth encrypted password generator. Follow the instructions carefully to build

the password generator.


a. Take a 5 digit integer number from user. If the number is not exactly

of 5 digits, give a warning message to user and exit/abort the program.

b. In case of a 5 digit number, convert the number to a corresponding

character.

c. Finally, generate a 5 length password and show it on screen.
Suppose you have some words and you want to right justify them, that is, align them to

the right. Create a program that reads a word and print it all right justified, in the same

order as they appear in the input.


Input:

The first line of the input will contain an integer N (1 ≤ N ≤ 50) indicating the number

of following words. Each word is composed of up to 50 letters (‘A’-‘Z’ or 'a'-'z') and

will contain at least one letter.


Output:

Print the words padded on the left with space characters so that they are all the same

length as the longest word found in that text.


Sample Input Sample Output

3

Bob

Tommy

Jim


Bob

Tommy

Jim
Suppose you have some words and you want to right justify them, that is, align them to

the right. Create a program that reads a word and print it all right justified, in the same

order as they appear in the input.


Input:

The first line of the input will contain an integer N (1 ≤ N ≤ 50) indicating the number

of following words. Each word is composed of up to 50 letters (‘A’-‘Z’ or 'a'-'z') and

will contain at least one letter.


Output:

Print the words padded on the left with space characters so that they are all the same

length as the longest word found in that text.


Sample Input Sample Output

3

Bob

Tommy

Jim


Bob

Tommy

Jim
Describe the for loop and compare with the for-each loop by describing the operation of each and

discussing how they differ from each other. You must include the role of enums in your description and

provide an example of a for loop and a for-each loop.
Describe the for loop and compare with the for-each loop by describing the operation of each and

discussing how they differ from each other. You must include the role of enums in your description and

provide an example of a for loop and a for-each loop.
i am making the riemann sum with x**3 but it needs to bo done with dx**3 , for example b - a / n


(5/8)**3 + 10/8**3 + 15/8**3 and this 5 times more because n is 8.


i have made this program so far , it is working with the calculation right now , but it needs to be changed to the example above. With a loop for n.



#formula to calculate dx

dx = float ((b-a)/n)


xi=a

Sum = dx

#loop

for i in range(0,n,n):

xi = a + dx

sum = Sum + f(xi)

print("the surface under the line is ", (sum*dx))
LATEST TUTORIALS
APPROVED BY CLIENTS