#Below is a class representing a person. You'll see the
#Person class has three instance variables: name, age,
#and GTID. The constructor currently sets these values
#via a calls to the setters.
#
#Create a new function called same_person. same_person
#should take two instances of Person as arguments, and
#returns True if they are the same Person, False otherwise.
#Two instances of Person are considered to be the same if
#and only if they have the same GTID. It does not matter
#if their names or ages differ as long as they have the
#same GTID.
#
#You should not need to modify the Person class.

class Person:
def __init__(self, name, age, GTID):
self.set_name(name)
self.set_age(age)
self.set_GTID(GTID)

def set_name(self, name):
self.name = name

def set_age(self, age):
self.age = age

def set_GTID(self, GTID):
self.GTID = GTID

def get_name(self):
return self.name

def get_age(self):
return self.age

def get_GTID(self):
return self.GTID

#Add your code below!

#Below are some lines of code that will test your function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: True, then False.
person1 = Person("David Joyner", 30, 901234567)
person2 = Person("D. Joyner", 29, 901234567)
person3 = Person("David Joyner", 30, 903987654)
print(same_person(person1, person2))
print(same_person(person1, person3))

Answers

Answer 1

Answer:

Here is the function same_person that takes two instances of Person as arguments i.e. p1 and p2 and returns True if they are the same Person, False otherwise.

def same_person(p1, p2):  #definition of function same_person that takes two parameters p1 and p2

   if p1.GTID==p2.GTID:  # if the two instances of Person have same GTID

       return True  #returns true if above condition evaluates to true

   else:  #if the two instances of Person do not have same GTID

       return False #returns false when two persons have different GTID

Explanation:

person1 = Person("David Joyner", 30, 901234567)  #first instance of Person

person2 = Person("D. Joyner", 29, 901234567)  #second instance of Person

person3 = Person("David Joyner", 30, 903987654)  #third instance of Person

print(same_person(person1, person2))  #calls same_person method by passing person1 and person2 instance of Person to check if they are same

print(same_person(person1, person3)) #calls same_person method by passing person1 and person3 instance of Person to check if they are same

The function works as follows:

For function call print(same_person(person1, person2))

The GTID of person1 is 901234567 and that of person2 is 901234567

If condition if p1.GTID==p2.GTID in the function same_person checks if the GTID of person1 is equal to the GTID of person2. This condition evaluates to true because GTID of person1 = 901234567 and GTID of person2 = 901234567

So the output is:

True

For function call print(same_person(person1, person3))

The GTID of person1 is 901234567 and that of person3 is 903987654

If condition if p1.GTID==p2.GTID in the function same_person checks if the GTID of person1 is equal to the GTID of person3. This condition evaluates to false because GTID of person1 = 901234567 and GTID of person2 = 903987654 and they are not equal

So the output is:

False

The complete program along with its output is attached in a screenshot.

#Below Is A Class Representing A Person. You'll See The #Person Class Has Three Instance Variables: Name,
#Below Is A Class Representing A Person. You'll See The #Person Class Has Three Instance Variables: Name,

Related Questions

Consider the binary search tree constructed for the words oenology, phrenology, campanology, ornithology, ichthyology, limnology, alchemy, and astrology using alphabetical order. Find the number of comparisons needed to locate or to add each of the following words in the search tree, starting fresh each time:

a. palmistry
b. etymology
c. paleontology
d. glaciology

Answers

Explanation:

Binary Search Tree is also called ordered tree or sorted binary tree. In the tree each node contains smaller values in the left side of the subtree and larger values in the right side of  the subtree.

WHICH PROGRAMMING LANGUAGES ARE THE BEST AND COMPATIBLE FOR 3D PRINTERS?

Answers

Answer:

G-code and C++ can be used

If you are to enhance the ICT used by your teachers, how will ypu do it? Will you use the same ICT or will you modify how it was integrated?​

Answers

To enhance the ICT (Information Communication Technology) used by teachers, I will modify how the ICT was integrated.

The modification of how ICT is integrated will change the culture that places teaching over technology.  Then, teachers will be taught how to use ICT to:

improve learning so that teachers become learning facilitatorsmotivate learners by fostering learning autonomy, making students less dependent on the teacherengage the learners by creating collaborative learningdiminish content learning so that students learn to think, create, and communicate effectivelymake learning a lifetime culture enhance the learning environment so that teachers become collaborators and co-learners with students.

Thus, I will enhance the ICT used by teachers by modifying its integration to achieve better results for both teachers and learners.

Learn more about the importance of ICT here: https://brainly.com/question/13724249

Differentiate between email and NIPOST System

Answers

Answer: NIPOST System is sending mail physical like photos and letters and many items

Email is electronic  mail sent through the internet but you can send it anywhere

Explanation:

Giving Branliest IFFF CORRECT

Which feature displays certain data in a database?

Chart

Filter

Seek

Sort

Answers

Answer:

filter

Explanation:

when you use filter, it only fetches data that meets the filter criteria you applied

Answer:

(2)/B - Filter

Explanation:

#Write a function called fancy_find. fancy_find should have #two parameters: search_within and search_for. # #fancy_find should check if search_for is found within the #string search_within. If it is, it should print the message #"[search_for] found at index [index]!", with [search_for] #and [index] replaced by the value of search_for and the #index at which it is found. If search_for is not found #within search_within, it should print, "[search_for] was #not found within [search_within]!", again with the values #of search_for and search_within. # #For example: # # fancy_find("ABCDEF", "DEF") -> "DEF found at index 3!" # fancy_find("ABCDEF", "GHI") -> "GHI was not found within ABCDEF!"

Answers

Answer:

Here is the Python program:

def fancy_find(search_within , search_for):  # function definition of fancy_find function that takes two parameters

   index = 0  #to store the index of search_within where the search_for string is found

   if search_for in search_within:  #checks if the string search_for is present in string search_within

       sf = search_for[0]  #points to the first character of the search_for

       for sw in search_within:  #iterates through search_within

           if sw == sf:  #if the first character of search_for is equal to the character at sw index of search_within

               if search_within[index:index+len(search_for)] == search_for:  #checks if the value of search_for is found in search_within

                   print(search_for,"found at index",index,"!")  #if above condition is true prints the message "[search_for] found at index [index]!", with [search_for] and [index] replaced by the value of search_for and the index at which it is found

                   return ""  

           index += 1  #increments value of index at each iteration

   print(search_for,"is not found within", search_within)  #if search_for is not found within search_within, prints message "[search_for] was not found within [search_within]!" with the values of search_for and search_within.

   return ""    

#following two statements are used to test the working of above function

print(fancy_find("ABCDEF", "DEF"))  #calls fancy_find() passing "ABCDEF" as search_within and "DEF" as search_for

print(fancy_find("ABCDEF", "GHI")) #calls fancy_find() passing "ABCDEF" as search_within and "GHI" as search_for

Explanation:

The program is well explained in the comments. I will explain the working of the function with the help of an example:

Suppose

search_within = "ABCDEF"

search_for = "DEF"

We have to find if search_for i.e. DEF is present in search_within i.e. ABCDEF

if search_for in search_within statement checks using in operator that if DEF is included in ABCDEF. Here this condition evaluates to true so the next statement sf = search_for[0]  executes which sets the first element of search_for i.e. D to sf. So sf = 'D'

for sw in search_within this statement has a for loop that iterates through ABCDEF and works as following:

At first iteration:

sw contains the first character of search_within  i.e. A

if sw == sf: condition checks if the first character of the search_for i.e. D is equal to sw i.e. A. Its not true so the program control moves to this statement:

index += 1 This increases the value of index by 1. index was initialized to 0 so now it becomes 1. Hence index=1

At second iteration:

sw contains the second character of search_within  i.e. B

if sw == sf: condition checks if the first character of the search_for i.e. D is equal to sw i.e. B Its not true so the program control moves to this statement:

index += 1 This increases the value of index by 1. index was initialized to 0 so now it becomes  2. Hence index=2

At third iteration:

sw contains the third character of search_within  i.e. C

if sw == sf: condition checks if the first character of the search_for i.e. D is equal to sw i.e. C Its not true so the program control moves to this statement:

index += 1 This increases the value of index by 1. index was initialized to 0 so now it becomes  3. Hence index=3

At fourth iteration:

sw contains the third character of search_within  i.e. D

if sw == sf: condition checks if the first character of the search_for i.e. D is equal to sw i.e. D. Its true so so the program control moves to this statement:

  if search_within[index:index+len(search_for)] == search_for:

current value of index=3

len(search_for) returns the length of DEF i.e. 3

So the if condition checks for the search_for in search_within. The statement becomes:

if search_within[3:3+3] == search_for:

search_within[3:3+3]  means from 3rd index position of search_within to 6-th index position of the search_within. This means from 4th element of search_within i.e. D to the last. Hence search_within[3:3+3] is equal to DEF.

search_for = DEF so

if search_within[3:3+3] == search_for: checks if

search_within[3:3+3] = DEF is equals to search_for = DEF

Yes it is true so

print(search_for,"found at index",index,"!") statement is executef which prints the following message:

DEF found at index 3!

This output is because search_for = "DEF" and index=3

Which of the following BEST describes an inside attacker?
An agent who uses their technical knowledge to bypass security.
An attacker with lots of resources and money at their disposal.
A good guy who tries to help a company see their vulnerabilities.
An unintentional threat actor. This is the most common threat.​

Answers

The inside attacker should be a non-intentional threat actor that represents the most common threat.

The following information related to the inside attacker is:

It is introduced by the internal user that have authorization for using the system i.e. attacked.It could be intentional or an accidental.So it can be non-intentional threat.

Therefore we can conclude that The inside attacker should be a non-intentional threat actor that represents the most common threat.

Learn more about the threat here: brainly.com/question/3275422

write the full form of E-mail?​

Answers

Answer:

Electronic Mail. This is your answer.

11. Which of the following is word processing
software?

Answers

WordPerfectWordpadMS Word

Hope this is correct

HAVE A GOOD DAY!

What are some of the major issues with geotagging? What concerns you the most?

Answers

Answer:

Major issues with geotagging include the ability to pinpoint the exact location where a photo was taken, which raises privacy concerns.

What concerns me the most is when a geotag of an unsuspecting victim's location falls into the wrong hands.

Explanation:

Geotag -  A geographical tag that can attach to SMS text messages, media such as photos and images, etc. The Geotag is measured in the longitude and latitude at which the image or text message took place.

explain computer coding in an understandable manner​

Answers

Answer:

Coding is simply how we communicate with computers. Code tells a computer what actions to take, and writing code is like creating a set of instructions

Explanation:

Computer coding empowers kids to not only consume digital media and technology, but to create it. Instead of simply playing videogame or envision what their own website, or app might look like and they'll have the outlet for the expression

1)What is Big Data?
2) What is machine learning?
3) Give one advantage of Big data analytics.
4) Give any one application of Big Data Analytics. 5) What are the features of Big Data Analytics?

Answers

Answer:

Big data is defined as the extremely large data set that may be analysed computationally to reveal pattern,trends and associations, related to human behaviour and interaction.

Machine learning is a sub area of artifical intelligence where by the terms refers to the ability of IT system to independently find the solution to problem by reconnaissance pattern in databases.

The one advantage of bigdata is

To ensure hire the right employees.

The application of bigdata data is

to communicate media application nd entertainment

Pls help me Pls help me

Answers

Answer:

20 10

Explanation:

please mark me as brainlyest

Define a function group-by-nondecreasing, which takes in a stream of numbers and outputs a stream of lists, which overall has the same numbers in the same order, but grouped into segments that are non-decreasing.

Answers

Answer:

def group_by_nondecreasing( *args ) :

     num_list = [arg for arg in args]

     sorted_numlist = sorted( num_list )

     list_stream = [ sorted_numlist, sorted_numlist, sorted_numlist ]

     return list_stream

Explanation:

This python function has the ability to accept multiple and varying amount of arguments. the list comprehension shorten the logical for statement to generate a list of numbers, sorts the list in ascending order by default and duplicates the list in another list.

Hello, I am having trouble adding a txt file into a array, so I can pop it off for a postfix problem I have uploaded what I have so far. I need help please

Answers

Answer:

#include <stack>

#include<iostream>

#include<fstream> // to read imformation from files

#include<string>

using namespace std;

int main() {

   stack<string> data;

   ifstream inFile("postfix.txt");

   string content;

   if (!inFile) {

       cout << "Unable to open file" << endl;

       exit(1); // terminate with error

   }

   while (getline(inFile, content)) {

       data.push(content);

   }

   inFile.close();

   return 0;

}

Explanation:

You were very close. Use the standard <stack> STL library, and make sure the stack elements are of the same type as what you're trying to add, i.e., std::string.

Which is the first computer brought in nepal for the census of 2028 B.S​

Answers

Answer:

The first computer brought in Nepal was IBM 1401 which was brought by the Nepal government in lease (1 lakh 25 thousands per month) for the population census of 1972 AD (2028 BS). It took 1 year 7 months and 15 days to complete census of 1crore 12.5 lakhs population.

Solve using Matlab the problems:

One using the permutation of n objects formula

One using the permutation of r objects out of n objects

you can make up your own questions.


Help me please

Answers

Answer:

Explanation:

% Clears variables and screen

clear; clc

% Asks user for input

n = input('Total number of objects: ');

r = input('Size of subgroup: ');

% Computes and displays permutation according to basic formulas

p = 1;

for i = n - r + 1 : n

   p = p*i;

end

str1 = [num2str(p) ' permutations'];

disp(str1)

% Computes and displays combinations according to basic formulas

str2 = [num2str(p/factorial(r)) ' combinations'];

disp(str2)

=================================================================================

Example:

How many permutations and combinations can be made of the 15 alphabets, taking four at a time?

The answer is:

32760 permutations

1365 combinations

A computer uses a programmable clock in square-wav e mode. If a 500 MHz crystal is used, what should be the value of the holding register to achieve a clock resolution of (a) a millisecond (a clock tick once every millisecond)

Answers

Answer:

500,000

Explanation:

A computer uses a programmable clock in square-wave mode. If a 500 MHz crystal is used, what should be the value of the holding register to achieve a clock resolution of (a) a millisecond (a clock tick once every millisecond)

1 millisecond = 1 million second = 1,000,000

For a 500 MHz crystal, Counter decrement = 2

Therefore value of the holding register to a clock resolution of 1,000,000 seconds :

1,000,000/2 = 500,000

A __________ infrastructure is made available to the general public or a large industrygroup and is owned by an organization selling cloud services.

a. community cloud
b. hybrid cloud
c. public cloud
d. private cloud

Answers

[tex]\Huge{\fbox{\red{Answer:}}}[/tex]

A public cloud infrastructure is made available to the general public or a large industrygroup and is owned by an organization selling cloud services.

[tex]<font color=orange>[/tex]

a. community cloud

b. hybrid cloud

c. public cloud

d. private cloud

Select all steps in the list below that should be completed when using the problem-solving process discussed in this chapter.


Take action.

Take a break.

Evaluate.

Complete the task.

Consider solutions and list ideas.

Understand the task or need.

Ask a coworker for help.

Answers

Take action.

Evaluate.

Complete the task.

Consider solutions and list ideas.

Understand the task or need.

Write a program that asks the user to enter a series of numbers separated by commas. Here is an example of valid input: 7,9,10,2,18,6 The program should calculate and display the sum of all the numbers.

Answers

Answer:

Here is the JAVA program. Let me know if you need the program in some other programming language.

import java.util.Scanner; // used for taking input from user

public class Main{ //Main class

public static void main(String[] args) {//start of main() function body

  Scanner scan = new Scanner(System.in); // creates a Scanner type object

   String input; // stores input series

    int sum = 0; //stores the sum of the series

    System.out.println("Enter a series of numbers separated by commas: "); //prompts user to enter a series of numbers separated by comma

     input = scan.nextLine(); //reads entire input series

     String[] numbers = input.split("[, ]"); //breaks the input series based on delimiter i.e. comma and stores the split sub strings (numbers) into the numbers array

   for (int i = 0; i < numbers.length; i++) { //loops through each element of numbers array until the length of the numbers reaches

          sum += Integer.parseInt(numbers[i]); } // parses the each String element of numbers array as a signed decimal integer object and takes the sum of all the integer objects

     System.out.println("Sum of all the numbers: " + sum);  } } //displays the sum of all the numbers

Explanation:

The program prompts the user to enter a series separated by commas.

Then split() method is used to split or break the series of numbers which are in String form, into sub strings based on comma (,) . This means the series is split into separate numbers. These are stored in numbers[] array.

Next the for loop iterate through each sub string i.e. each number of the series, converts each String type decimal number to integer using Integer.parseInt and computes the sum of all these integers. The last print statement displays the sum of all numbers in series.  

If the input is 7,9,10,2,18,6

Then the output is: 7+9+10+2+18+6

sum = 52

The program and its output is attached.

some properties of Internal and External Storage.

Answers

Answer:

Internal Storage

This has to do with the primary memory of a computer that is used to store the user's files, applications, etc. This is where the Operating System and pre-installed software is installed. There are two types of internal memory which are ROM and RAM.

Properties

They are volatileThey contain the OS of the systemROM loses data when power is lostRAM does not lose storage when power is lost.

External Storage

These are secondary memory that is not primarily permanently attached to the computer. This is a device that contains all the addressable data storage which are not inside the computer's storage. Some examples of external storage are flash drives, CD ROMs, etc.

Properties

They are addressableThey can be easily detached.

Which function in Excel tells how
? many numeric entries are there
SUM O
COUNT
SQRT O
SORT O

Answers

Answer:

Count

Explanation:

Let's see which function does what:

SUM

This function totals one or more numbers in a range of cells.

COUNT

This function gets the number of entries in a number field that is in a range or array of numbers

SQRT

This  function returns the square root of a number.

SORT

This function sorts the contents of a range or array.

As we see, Count is the function that gets the number of entries.

Answer:

Count

Explanation:

Tells how many numeric entries are there.

Explain how mobile phone production could be more sustainable​

Answers

Answer:

Sustainable design - the key features for sustainable phones are: use of sustainable and recycled materials, the use of less energy and efficient charging, durability, and last but not least they should be easy and inexpensive to repair.

Answer:

One of the best ways to change this is to voice your concern to cell phone manufacturers for more sustainable products. Request smartphones that are made with fewer hazardous chemicals, manufactured in plants powered by renewable energy, and that contain recycled materials.

Explanation:

The readline method reads text until an end of line symbol is encountered, how is an end of line character represented

Answers

Answer:

\n

Explanation:

readline() method is used to read one line from a file. It returns that line from the file.    

This line from the file is returned as a string. This string contains a \n at the end which is called a new line character.

So the readline method reads text until an end of line symbol is encountered, and this end of line character is represented by \n.

For example if the file "abc.txt" contains the lines:

Welcome to abc file.

This file is for demonstrating how read line works.

Consider the following code:

f = open("abc.txt", "r")  #opens the file in read mode

print(f.readline()) # read one line from file and displays it

The output is:

Welcome to abc file.    

The readline() method reads one line and the print method displays that line.                        

Write a function called "equals" that accepts 2 arguments The two arguments will be of type list The function should return one string, either "Equals" or "Not Equals" For the lists to be equal, they need to: Have the same number of elements Have all the elements be of the same type Have the order fo the elements be the same DO NOT USE "

Answers

Answer:

import numpy as np

def equals(list1, list2 ):

     compare = np.all( list1, list2)

     if ( compare == True):

           print ( "Equals")

     else :

           print(" Not Equals")

Explanation:

This python function utilizes the numpy package to compare two list items passed as its argument. It prints out "equals" for a true result and "not equal" for a false result.

what are the programs in a computer​

Answers

Answer:

Computer skills examples

Operating systems  

Office suites  

Presentation software

Spreadsheets  

Accounting software

Explanation:

A program is a set of ordered operations for a computer to do in computing. The program in the modern computer described by John von Neumann in 1945 has a one-at-a-time series of instructions that the computer follows. Typically, the application is saved in a computer-accessible storage location.

what makes''emerging technologies'' happen and what impact will they have on individuals,society,and environment

Answers

Answer:

Are characterized by radical novelty

Explanation:

Example, intelligent enterprises are reimaging and reinventing the way they do bussines

Suppose that a class named ClassA contains a private nonstatic integer named b, a public nonstatic integer named c, and a public static integer named d. Which of the following are legal statements in a class named ClassB that has instantiated an object as ClassA obA =new ClassA();?

a. obA.b 12;
b. obA.c 5;
c. obA.d 23;
d. ClassA.b=23;
e. ClassA.c= 33;
f. ClassA.d= 99;

Answers

Answer:

b. obA.c 5;

d. ClassA.b=23;

f. ClassA.d = 99;

Explanation:

Java is a programming language for object oriented programs. It is high level programming language developed by Sun Microsystems. Java is used to create applications that can run on single computer. Static variable act as global variable in Java and can be shared among all objects. The non static variable is specific to instance object in which it is created.

who is the owner of apple company??​

Answers

Answer:

Steven Paul Jobs......

....

Other Questions
Identify the conjugate pairs in the following acid-base reactionHCO(aq) + CHN(aq) HNO-(aq) + HCHN+(aq) 6(2+5)-2^2x2(9/3)+10/5 Andrew rents rooms in his hotel for an average of $97 per night. The variable cost per rented room is $36. His fixed costs are $52,000 per month. How many rooms does he have to rent per month in order to break even? Give me two paragraph about Harry Potter. a=bcd in order to solve the equation above for b you must multiply both sides of the equation by the same expressiona x _ = bcd x _the results equation is:b= 2(3+ 4)(73)(2 2) Does anyone know any good websites that sell new/used books for cheap? Can someone help me with this HELPPPP Read the following two sentences. The treasure they discovered had been buried deep in the sand. It would take all day to unearth it. Use the context clues to find the definition for the word unearth as it is used in these sentences.A to uncover B to dig out C to find D to get up ou have spent the last two hours creating a report in a file and afterwards you use cat to create a new file. Unfortunately the new file name you used was the same as the name you used for the report, and now your report is gone. What should you do next time to prevent this from happening This country has one of the lowest poverty rates of all Spanish speaking countries at around 15%. It produces a lot of mineral exports in its mines. Climate it partially mountainous, partially rolling plains and some desert areas. Hola! alguien me puede decir cuales son los personajes principales y segundarios de el libro "el ltimo grumete de la baquedano "porfa c: Should immigrants be challenged to prove their loyalty to their newhomeland? Why or why not? translate to English:Mi da de fiesta favorito es el da de micumpleaos. Siempre hacemos una fiesta. Mispadres y yo decoramos la casa con globos y luces.Mi mam siempre me prepara un pastel. Pero lomejor es que todos mis amigos vienen y traenmsica y nos pasamos la noche bailando. When fighting broke out between North and South Vietnam in 1974, the United Statesa.established a demilitarized buffer zone to separate the two sides.b.honored the Paris Peace Accords by not sending troops back to support South Vietnam.c.sent troops to prevent the North Vietnamese from capturing Saigon.d.provided supplies and training to South Vietnam even as American troops left the country.Please select the best answer from the choices providedABCDPLZ HURRY IM TIMED!! 2c+17.6 =6 / 4 SOLVE give your answer as a decimal get brainly Should social reform be provided by citizens or the government?Is volunteering a responsibility of all citizens? Why or why not?How can local government shape the lives of citizens? Which of the following sentences contains an example of a metaphor?O The blue water of the ocean calls to the swimmers.O Carmen is a real angel to volunteer at the hospital.O Stephen is as quiet as a mouse.O The sweet aroma of chocolate filled the room. ) A company finds that consumer demand quantity changes with respect to price at a rate given by D'(p) = - 2000 p 2 . Find the demand function if the company knows that 834 units of the product are demanded when the price is $5 per unit. Atrial fibrillation, rheumatic heart disease, and valvular prosthetics are risk factors for which type of stroke