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 Java program that prompts the user to enter thier gender ( Female/ male) and day of the week ( Monday to Sunday). If you enter Monday, or Tuesday, or Wednesday or Thursday it should read "Hello sir, enjoy your day" or "Hello mam enjoy your day". But when entered Friday, or Saturday, or Sunday it should read "Hello sir enjoy your weekend" or "Hello mam enjoy your weekend "

Median

given a list of integers,write a program to print the median. 

input 

the input will be a single line of containing space-separated integers.

output

the second line of output should contain the median, round off the value to 2 decimal places.

median should be a float value when there are even number of elements, otherwise should be an integer value.

see sample input/output for the output format

explanation 

for example, if the given list of integers are 

2 4 5 6 7 8 2 4 5 2 3 8

the average of all the numbers is 4.67.

after sorting the array,

2 2 2 3 4 4 5 6 7 8 8

as the length of the list is an even number, the median will be the average of the two middle numbers in the sorted list.

the middle numbers will be 5 and 4. so the average of 5 and 4 will be median, which is 4.5

so the output should be

Median: 4.5


sample input 1

2 4 5 6 7 8 2 4 5 2 3 8

sample output 1

Median: 4.5


If df is a DataFrame that includes a column 'x', what is NOT a way to add a new column 'y', using a function 'f' that applies a transformation?

Select an answer:

  • df.y = f(df.x)
  • df['y'] = None; df.y = f(df.x)
  • df['y'] = f(df['x'])
  • df = df.assign(y = f(df.x))

mean


given a list of integers,write a program to print the mean. 

mean - the average value of all the numbers.


input

the input will be a single line containing space-separated by integers.


output

the first line of output should contain the mean, round off the value to 2 decimal places.

mean should always be a float value.

see sample input/output for the output format.


explanation


for example, if the given list of integers are 

2 4 5 6 7 8 2 4 5 2 3 8

the average of all the numbers is 4.67.

as the length of the list is an even number,

so the output should be


Mean: 4.67


for example, if the given list of integers are 

2 6 3 1 8 12 2 9 10 3 4

the average of all the numbers is 5.45.

as the length of the list is an even number,

so the output should be


Mean: 5.45


sample input 1

2 4 5 6 7 8 2 4 5 2 3 8

sample output 1

mean: 4.67

sample input 2

2 6 3 1 8 12 2 9 10 3 4

sample output 2

mean: 5.45


Discuss the ways in which a full-page word processor is or is not a direct manipulation interface for editing a document using Schneider man's criteria. What features of a modern word processor break the metaphor of composition with pen (or typewriter) and paper?





(15)marks

#include <iostream>

#include <string>

using namespace std;

struct book

{

string title;

string author;

unsigned int year;

};

int main()

{

book bookrec;

cout << “Enter Book Title:”; getline(cin,bookrec.title);

cout << “Enter Book Author:”; getline(cin,bookrec.author);

cout << “Enter Publication Year:”; cin >> bookrec.year;

cout << “The following information has been received…\n”);

cout << “Book Title:” << bookrec.title;

cout << “Book Author:” << bookrec.author;

cout << “Year Published:” << bookrec.year << “\n”;

system(“pause”);

return 0;

}


qusetion: Multiplication of matrix ??


input:

3 3

1 2 3

4 5 6

7 8 9


10 11 12

13 14 15

16 17 18


output:-

[84 90 96]

[201 216 231]

[318 342 366]





Construct a simple purchasing program based on the Requirement Below.



Main.java should only contain the main method and a Reference of Purchase Object. Purchase.java should contain this fields & Methods:





Fields/Instance Variables



-itemName : String



-itemPrice : double



-itemQuantity : int



-amountDue :double





Methods



setItemName(String itemName) : void



setTotalCost(int quantity, double price) : void



getItemName(): String



getTotalCost(): double



readInput():void



writeOutput(): void





Note: The readinput() method will be used to accept user input through the Scanner class.



Simple output :


Enter the name of the Item you are Purchasing: Bag


Enter QTY and Price Separated by a space: 3 499.75


You are Purchasing 3 Bag(s) at 499.75 each.


Amount due is 1,499.25



question: find the perimeter of the given matrix?


input1:-

3 3

1 2 3

4 5 6

7 8 9

output :-

1+2+3+4+6+7+8+9 = 40


input2:-

4 4

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

output:-

1+2+3+4+5+8+9+12+13+14+15+16= 102





Create a program using C# that implements the stream ciphers Cryptographic method . A stream cipher method inputs digits, bits, or characters and encrypts the stream of data. The onetime pad is an example of a stream cipher.

In this formative you have been requested to create an application that will work as the One-time pad (OTP), also called Vernam-cipher or the perfect cipher. This is a crypto algorithm where plaintext is combined with a random key and generate a ciphertext.


Marks allocation 

1. The programme should received a string " How are you Isaac " - 10

2. The programme should generate an OTP of the length of the string entered "How are you Isaac "- 10

3. The program should Generate a Ciphertext based on the above example- 30

LATEST TUTORIALS
APPROVED BY CLIENTS