Questions
Exercise #3 python Write a program that could evaluate the relationship between two values. User is...

Exercise #3 python

Write a program that could evaluate the relationship between two values. User is to key in the two values, and it will be stored in variable, num1 and num2. The program will do a comparison between the two values. If num1 is greater than num2, a message will be display on screen to indicate that num1 is greater than num2. The program will also display appropriate messages when num2 is greater than num1; and num1 is equal to num2. Once user get to know the relationship between the two values, he/she should be prompted with an option to insert the next two values or terminate the program.

In: Computer Science

Intro to Java Question. Please Provide code and pseudocode for understanding. Not receiving correct results currently....

Intro to Java Question. Please Provide code and pseudocode for understanding. Not receiving correct results currently.

Problem 5: Player Move Dungeon (10 points) (Game Development)

You're the lead programmer at a AAA studio making a sequel to the big hit game, Zeldar 2. You've been challenged to implement player movement in dungeons. The game is top-down, with dungeons modeled as a 2d grid with walls at the edges. The player's location is tracked by x,y values correlating to its row and column positions. Given the current position of the player and a sequence of input commands: w,a,s,d you must determine the new position of the player. The player must not be able to move outside the walls of the dungeon (i.e. grid)

Facts

● the player's position is modeled using two integer values (x, y)

● x represents the column position, left-right axis ● top-left corner is (0,0)

● y represents the row position, up-down axis

● “w” move up by decreasing y by 1

● “a” move left by decreasing x by 1

● “s” move down by increasing y by 1

● “d” move right by increasing x by 1

● if an input attempts to move player off grid, then ignore that move.

Input

The first input is the number of test cases. Each test case contains three lines of inputs. The first line is two positive integers that represent the dungeon's grid size, rows (length) columns (width). The second line is two non-negative integers representing the player's position in the dungeon grid, x,y. The third line represents the sequence of player movements "w", "s", "a", "d".

Output

The program should print the final location of the player in the form of , where “x” and “y” are the coordinates within the dungeon grid.

Sample Input

2

4 4

2 3

s s s w

10 10 9 4

s d w a

Sample Output

2 2 8 4

In: Computer Science

Write a C++ program to find K largest elements in a given array of integers. For...

Write a C++ program to find K largest elements in a given array of integers. For eeample, if K is 3, then your program should ouput the largest 3 numbers in teh array. Your program is not supposed to use any additional array.

In: Computer Science

# FOR THE NEXT FEW QUESTIONS YOU WILL WORK WITH THE TEN SEGMENTS DATA FROM PART...

# FOR THE NEXT FEW QUESTIONS YOU WILL WORK WITH THE TEN SEGMENTS DATA FROM PART 1 OF THE EXAM. THE DATA ARE LOCATED ON Canvas.

10) Write code to import TenSegments.csv into R as a data frame tensegments

11) Write code that creates a new column with the CLV for all segments using formula 1. Assume a discount rate of 10%.

12) Write a for loop that loops through all the CLV values and creates a new vector that contains any CLV values that are negative

# FOR 1 BONUS POINT: # Write 1 line of code that calculates the average acquisition cost for the 3 segments with the highest CLV. You cannot hard code any values into your code.

In: Computer Science

Intro to java Problem, Please provide code and Pseudocode. Not able to compile correct numbers. Problem...

Intro to java Problem, Please provide code and Pseudocode. Not able to compile correct numbers.

Problem 7: Simple Calculator (10 points) (General) Calculators represent the most basic, general-purpose of computing machines. Your task is to reduce your highly capable computer down into a simple calculator. You will have to parse a given mathematical expression, and display its result.

Your calculator must support addition (+), subtraction (-), multiplication (*), division (/), modulus(%), and exponentiation (**).

Facts

● Mathematical expressions in the form of: num1 operator num2

● Exponentiation should be in the form base ** exponent

○ Example: 3 ** 2 = 9 Input First line is the number of test cases. Each line thereafter is an integer-based mathematical expression in the form defined in the above facts.

Output

For each test case, display the result of the mathematical expression terminated with a new line

character

Sample Input

4

3 + 7

5 - 1

4 ** 2

19 / 5

Sample Output

10

4

16

3

In: Computer Science

Must be in python The ISO 8601 Standard date format for Information Interchange indicates that a...

Must be in python

The ISO 8601 Standard date format for Information Interchange indicates that a date be written as such:

yyyy-MM-dd (eg. 2012-07-02, 1999-12-05, 1998 -01-27 )   

where yyyy represents the four digit year

MM represents a two digit numerical month

dd represents a two digit numerical day

Chinese date format is specified as: yyyy-M-d

Macedonean date format is specified as: d.M.yyyy.

where yyyy represents the four digit year

M represents a one or two digit numerical month, as appropriate

d represents a one or two digit numerical day, as appropriate

You are to write a program which converts dates from Chinese and Macedonean formats to ISO format. The program will repeat the following until the user wishes to exit:

* ask the user which format they will be entering (C - Chinese or M-Macedonean)

* accept the user input

* output the ISO version of the date that was input

Your program should handle user input errors such as:

* leading blanks

* blanks within the input string

Your program should delegate any large operations to functions which should be DEFINED AN IMPORTED MODULE, for example month conversion to mFormat, MMformat.

In: Computer Science

In C++ write an implementation of the ADT sorted list that uses a resizable array (vector...

In C++ write an implementation of the ADT sorted list that uses a resizable array (vector class of C++ STL) to represent the list items.

In: Computer Science

Compare the Data Modeling difference between relational database and NoSQL MongoDB.

Compare the Data Modeling difference between relational database and NoSQL MongoDB.

In: Computer Science

Write a program in python that takes a date as input and outputs the date's season....

Write a program in python that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day.

Ex: If the input is:

April
11

the output is:

Spring

In addition, check if the string and int are valid (an actual month and day).

Ex: If the input is:

Blue
65

the output is:

Invalid 

The dates for each season are:
Spring: March 20 - June 20
Summer: June 21 - September 21
Autumn: September 22 - December 20
Winter: December 21 - March 19

In: Computer Science

Regarding Risk Management What are the risk response strategies to positive risk? I will give you...

Regarding Risk Management

What are the risk response strategies to positive risk? I will give you one Exploit. Please discuss the others.

PLEASE MAKE COPY PASTE AVAILABLE

In: Computer Science

You work as a network administrator for a college located in your local city. Next door...

You work as a network administrator for a college located in your local city. Next door to the college is a new gated community. The residents have been moving in over the last few months. The college is running a converged network. The services that are present on the infrastructure include the phone system that all staff and faculty use to make calls (voice network). The data for students and faculty are also present on the infrastructure. The infrastructure includes a student-accessible wireless environment.

You have gotten numerous complaints about call quality. Complaints have included the following:

  • It has been intermittent and very hard to track down the issue.
  • The trouble report states that the call quality is poor and that calls are breaking up.
  • It was also stated that the overall network performance is very bad, and it started a few months ago but is progressively getting worse.
  • It takes a long time to access any files or the Internet.

About 2 months ago, you implemented a network monitoring solution. You decided to check the logs as a result of a call you received from your CIO. The president of the college was on an important phone call and was not able to communicate as a result of the call quality. A review of your performance monitor logs revealed an enormous amount of traffic on the network. This excess network traffic was generated from the wireless LAN. Network traffic was destined for P2P (peer-to-peer) Web sites for movie and music downloads. The logs further reveal very high traffic volume when the students, staff, and faculty were off campus. You just remembered that the university did not have a wireless access control solution in place. It appears that unauthorized usage of the wireless network is generating this traffic that is greatly affecting network performance. You reported this finding to the CIO, and she needs a resolution.

Assignment Deliverable

  • Research and identify an enterprise wireless access control solution.
  • Based on your research, write a report of 1–2 pages for your boss on your solution to the above stated issues.
  • Explain how security mechanisms were employed.

In: Computer Science

This is an Intro to java question. Please provide code and pseudocode for better understanding. Problem...

This is an Intro to java question. Please provide code and pseudocode for better understanding.

Problem 4: Player Move Overworld (10 points) (Game Development) You're the lead programmer for an indie game studio making a retro-style game called Zeldar. You've been tasked to implement the player movement. The game is top-down, with the overworld modeled as a 2d grid. The player's location is tracked by x,y values correlating to its row and column positions within that grid. Given the current position of the player and a sequence of input commands: w,a,s,d you must determine the new position of the player.

Facts

● the player's position is modeled using two integer values (x, y)

● x represents the column position, left-right axis

● y represents the row position, up-down axis

● “w” move up by decreasing y by 1

● “a” move left by decreasing x by 1

● “s” move down by increasing y by 1

● “d” move right by increasing x by 1

Input

The input will begin with a single line containing the number of test cases to execute. The next line should consist of the starting (x,y) position of the player. The next line is the sequence of moves represented with "w", "a", "s", or "d". This sequence can be empty string to any number of letters long. Each input is separated by a space with the last terminated with a new line.

Output

The program should print out the final location of the player in the form of , where “x” and “y” are the coordinates on the overworld grid.

Sample Input

2 0 0

w w a a a

9 4

s d w a

Sample Output

-3 -2

9 4

In: Computer Science

This problem is about the java programming and contain two parts First part: a word that...

This problem is about the java programming and contain two parts

First part:

a word that reads the same forward and backward is called a palindrome, e.g., "mom", "dad", "racecar", "madam", and "Radar" (case-insensitive). Write a program called TestPalindrome, that asks the user for a word and prints whether the word is a palindrome or not.
Hint: for a string called inStr, you can use inStr. toLowerCase() which returns a new string which is all in lower case letters. Use two indexes forwardIndex and backwardIndex to scan the string forward and backward at the same time.

Give the code of the first part.

The second part is :

copy-paste the TestPalindrome program,Then modify the program to check a whole sentence (not just one word) to see whether it is a palindrome or not. Punctuation, spaces, and capitalization must be ignored.
Here are examples of palindromic sentences:
•Madam, I'm Adam
•A man, a plan, a canal - Panama!
Hint: to read a whole sentence, create a Scanner object called input and then use input.nextLine(). For a character variable called c, you can use Character.isLetter(c) to compute a boolean result indicating whether the character is a letter or not.
The

In: Computer Science

-In google Colab from sklearn.datasets import load_breast_cancer allData = load_breast_cancer() X = allData['data'] y = allData['target']...

-In google Colab

from sklearn.datasets import load_breast_cancer
allData = load_breast_cancer()
X = allData['data']
y = allData['target']

-# How many features or attributes does this machine learning problem have? Hint use allData['DESCR'] to determine that.

- #Compute the shape or the dimensions of x,  and Compute the shape or the dimensions of y?

- Import a classifier, create an instance of the classifier and fit or train he classifier using the training data.

- #compute the number of true positives, true negatives, false negatives and false negative rate

In: Computer Science

Iterating a method over a collection of objects is a common task that you may complete...

Iterating a method over a collection of objects is a common task that you may complete unknowingly each day. Within a collection of similar things, you identify the characteristics that make the individual elements unique and treat them differently according to their classifications. For example, assume that you are at a store and want to pay for something in cash. The bills in your wallet or purse represent a collection of similar objects, differentiated by denomination. It would not be very helpful to treat all of the bills the same, even though they are made from the same paper and have the same dimensions—eight bills does not equate to eight dollars unless each is a one-dollar bill.

How would you calculate how much money you have to spend? Each denomination needs a different value assigned. You compute a running total until you have accounted for all of the bills. For the moment, assume you are uncomfortable carrying large bills, so your wallet or purse contains $1, $5, $10, or $20 bills. The following program represents a “pseudo code” solution to this exercise.

totalCash is a whole number that starts at zero

while (I still have bills left to account for)

     if (current bill is $1)
          add 1 to totalCash
     if (current bill is $5)
          add 5 to totalCash
     if (current bill is $10)
          add 10 to totalCash
     if (current bill is $20)
          add 20 to totalCash

if (totalCash > itemPrice)
     I have enough money to buy the item.

else
     I don’t.

This is an example of an iterative method because it is repeated over and over for the entire collection.

Think of a way in which you apply an iterative method to a collection of similar objects in your day-to-day life. Be creative—in other words, identify a situation that does not involve money (either paper or coins). Think about the ways in which the items of your collection are alike, as well as the key ways in which they differ.

Post a response that:

  1. Briefly describes your collection and the elements that comprise it
  2. Identifies the characteristic(s) that differentiate(s) the elements of the collection
  3. Briefly describes the method you apply to that collection
  4. Defines the method using pseudo code that contains at least two if methods

In: Computer Science