Questions
Exercise: Change Orb Location ------------------------- ### Description In this series of exercises, you will create functions...

Exercise: Change Orb Location
-------------------------

### Description

In this series of exercises, you will create functions
to create, modify and examine dictionaries that
represent information about a memory orb. Memory
orbs have three important pieces of information:
The `emotion` that created the memory, the `location`
the memory is stored, and the `data` which is the
information in the memory.

For this exercise, you will create a function that
will change the value of the `location` key in a
dictionary.

### Files

* `orbfunctions.py` : set of functions to work with memory orbs.

### Function Name

`move_orb`

### Parameters

* `orb` : a dictionary
* `new_location` : a string, the new value for `location`

### Action

Changes the value associated with the key `location`.

### Return Value

The modified dictionary, `orb`.

def create_orb(emotion, location, data):
dict = {
"emotion":emotion,
"location":location,
"data":data
}
return dict

def orb_get_emotion(orb):
return orb["emotion"]

def change_orb_emotion(orb, new_emotion):
orb.update({"emotion":new_emotion})
return orb
def orb_get_location(orb):
if orb.get('location'):
return orb.get('location')
else:
return None
  
def move_orb(orb,location):
if

In: Computer Science

Do research to determine the current status of PTC deployment. Summarize your findings in a couple...

Do research to determine the current status of PTC deployment. Summarize your findings in a couple of paragraphs.

In: Computer Science

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and...

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:

Min miles: -10
Max miles: 40

import java.util.Scanner;

public class ArraysKeyValue {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i;
int j;
int maxMiles; // Assign with first element in milesTracker before loop
int minMiles; // Assign with first element in milesTracker before loop

for (i = 0; i < milesTracker.length; i++){
for (j = 0; j < milesTracker[i].length; j++){
milesTracker[i][j] = scnr.nextInt();
}
}

/* Your solution goes here */

System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}
}

In: Computer Science

Python Coding: Working with Conditions and Dictionaries. 1. Create three dictionaries (student_1, student_2, student_3). 2. In...

Python Coding:

Working with Conditions and Dictionaries.

1. Create three dictionaries (student_1, student_2, student_3).

2. In each student dictionary have a key-value for first_name, last_name, and an id number (6 digit), and a current_course. The values assigned to each of these keys is your choice.

3. Also each student will have in their dictionary a list for grades. You will need to add 3 grade values into the list.

4. Provide the student with a message about each assignment grade based on the grade value.

For each of the grades for each assignment:

Provide a 90-100 grade message. My example used 'Congratulations'

Provide a 80-89 grade message. My example used 'Good job!'

Provide a 70-79 grade message. My example used 'You passed!'

Provide a 60-69 grade message. My example used 'Bad news, below average'

59 or lower grade message would be 'Failed.'

For each grade:

'You have made a {grade value} on assignment {assignment number}.

5. Print out each student's data as shown in the example output below:

Name: Smith, John   

Id: 646562   

Course: ITSE 1359

Grades: 86, 74, 94

Good job!

You have made a 86 on assignment 1.

You passed!

You have made a 74 on assignment 2.

Congratulations

You have made a 94 on assignment 3.

In: Computer Science

Consider the following class definition: class circle                                  &nb

  • Consider the following class definition:

    class circle                                                       class cylinder: public circle
    {                                                                      {
    public:                                                             public:
    void print() const;                                           void print() const;
    void setRadius(double);                                  void setHeight(double);
    void setCenter(double, double);                     double getHeight();
    void getCenter(double&, double&);               double volume();
    double getRadius();                                        double area();
    double area(); circle();                                     cylinder();
    circle(double, double, double);                       cylinder(double, double,
    double, double);
    private:                                                private:
    double xCoordinate;                                       double height;
    double yCoordinate;                         }
    double radius;
    }

    Suppose that you have the declaration:
    cylinder newCylinder;

  1. Write the definitions of the member functions of the classes circle and cylinder. Identify the member functions of the class cylinder that overrides the member functions of the class circle.

In: Computer Science

You are in charge of the computers at a large inner-city library. Most of the people...

You are in charge of the computers at a large inner-city library. Most of the people who live in the neighborhood do not have a computer at home. They go to the library when they want to access the Internet. About two-thirds of the people surfing the Web on the library’s computers are adults. You have been requested to install filtering software that would block Websites containing various kinds of material deemed inappropriate for children. You have observed this software in action and know that it also blocks many sites that adults might legitimately want to visit. How should you respond to the request to install filtering software?

In: Computer Science

If you were to explain why software engineering teams have different ethical responsibilities than other computing...

If you were to explain why software engineering teams have different ethical responsibilities than other computing professionals – what would you argue? Explain why or why not you agree with this statement. (2.5 points)

In: Computer Science

C++ language We are given a Queue data structure that supports standard operations like Enqueue() and...

C++ language

We are given a Queue data structure that supports standard operations like Enqueue() and Dequeue(): Enqueue(element): add a new element at the tail of the queue; Dequeue(): delete the element at the head of the queue.

Show how to implement a stack using two queues. Analyze the running time of the stack operations: Push and Pop.

In: Computer Science

Kalamazoo College requires all computers connected to the campus network be running up-to-date antivirus software. When...

Kalamazoo College requires all computers connected to the campus network be running up-to-date antivirus software. When a student’s computer is discovered to have a virus, its network connection is cut until a staff member can remove the virus. If it turns out that the computer was not running up-to-date antivirus software, the student is fined $100. Is this a morally justifiable policy?

In: Computer Science

THE FOLLOWING QUESTION IS FOR C PROGRAMMING LANGUAGE Printing the decimal equivalent of a binary number....

THE FOLLOWING QUESTION IS FOR C PROGRAMMING LANGUAGE

Printing the decimal equivalent of a binary number. Write a program that accepts an integer (5 digits or fewer) containing only 0s and 1s (i.e., binary) and prints out its decimal equivalent using the remainder and division operator to select the "binary" digits one at a time. Make sure your input is tested for multiple options: incorrect characters, too many, too few, etc.

I need help making this program. No loops, if else, or while statements are allowed. Thank you!

In: Computer Science

Write a C program for the recursive algorithm that removes all occurrences of a specific character...

Write a C program for the recursive algorithm that removes all occurrences of a specific character from a string. (please comment the code)

In: Computer Science

Discuss the role of people within a company's computer-security plan.

Discuss the role of people within a company's computer-security plan.

In: Computer Science

BEFORE YOU START MAKE SURE TO SEND AS A TEXT FILE NOT PDF OR PICTURES. WRITE...

BEFORE YOU START MAKE SURE TO SEND AS A TEXT FILE NOT PDF OR PICTURES. WRITE IN A NEXT FILE IN JAVA ECLIPSE FORMAT. WILL BE POSTING THE CODE ON JAVA ECLIPSE. ALSO WILL GIVE THUMBS UP

Write a class called Dog that contains instance data that represents the dog’s name and age. Define the Dog constructor to accept and initialize instance data. Include getter and setter methods for the name and age. Include a method to compute and return the age of the dog in “person years” (seven times the dog’s age). Include a toString method that returns a one-line description of the dog. Create a driver class called Kennel, whose main method instantiates and updates several Dog objects.

In: Computer Science

C++ Define a MyDate class to represent a data that has 3 data members: day, month,...

C++
Define a MyDate class to represent a data that has 3 data members: day, month, year. The class should have: A default constructor to initialize the day, month, and year to 0. A constructor that accepts three integers as arguments to initialize the day, month, and year if the three arguments are valid. A copy constructor that accepts a reference to a MyDate object as argument. This constructor use the argument's three data fields to initialize the day, month, and year. Overload the operator + : this function adds a number of days to the calling object and return the result date. Overload the operator -: this function accepts a MyDate object as argument. It calculates the number of days difference between the calling object and the argument object. Overload the operator -: this function subtract a number of days to the calling object and return the result date. Overload the opertor ==: this function accepts a MyDate object as argument. It compares the calling object with the argument object and returns true if they are the same date, otherwise, the function returns false. Friend function to overload operator >>: this function accepts an istream object and a MyDate object as argument. In this function, it get the day, month, and year as input and returns a MyDate object. Friend function to overload operator <<: this function accepts an ostream object and a MyDate object as argument. In this function, it displays the day, month, and year of the MyDate object in mm/dd/yyyy format.

In: Computer Science

Compare and contrast OSI and TCP/IP network models. Differentiate between same-layer interactions and adjacent-layer interactions in...

  1. Compare and contrast OSI and TCP/IP network models.
  2. Differentiate between same-layer interactions and adjacent-layer interactions in network models (applicable for both TCP/IP and OSI models), and specify why each type of interaction is required in networking.
  3. Explain what is data encapsulation and why is it required in computer networking.
  4. Convert the following physical and logical addresses to the required formats:
    • MAC Address: AD:6F:23:4C:9B:EE to the equivalent binary
    • IP Address: 11000000.10010001.00011010.00000100 to the equivalent decimal

In: Computer Science