1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lesya [120]
3 years ago
11

Define a class, addresstype, that can store a street address, city, state, and zip code. use the appropriate functions to print

and store the address. also, use constructors to automatically initialize the member variables
Computers and Technology
1 answer:
xxTIMURxx [149]3 years ago
4 0

We will use Python for this task. 
 class addrestype(object): 
 # Constructor to initialize member variables
 def __init__(self, addr, city, state, zip):
  self.address = addr
  self.city = city
  self.state = state
  self.zip = zip 
 # Function to print the address (overrides behavior of builtin "print")
 def __str__(self):  return self.address + ", " + self.city + ", " + self.state + ", " + str(self.zip)

You might be interested in
​______________________ is a general security term that includes computer​ viruses, worms, and trojan horses.
VashaNatasha [74]
Malware
-------------------
6 0
3 years ago
Which bus slot provides the highest video performance​
Sphinxa [80]

Answer: PCI, The PCI provides the highest performance

4 0
3 years ago
. What process skill would a scientist use to find the length of a line
Brilliant_brown [7]

Answer:

Explanation:

A ruler

;););););););););););););););)

7 0
3 years ago
Write a program that declares and initializes a variable representing the weight in milligrams from the keyboard. The program di
Burka [1]

Answer:

weight = int(input("Enter weight in milligrams: "))

kilograms = int(weight / 1000000)

grams = int((weight - (kilograms * 1000000)) / 1000)

milligrams = weight - ((kilograms * 1000000) + (grams * 1000))

print("{} milligrams are equivalent to {} kilogram(s), {} gram(s), and {} milligram(s)".format(weight, kilograms, grams, milligrams))

Explanation:

*The code is in Python.

Ask the user to enter the weight and set it to the variable weight

Calculate the kilograms, divide the weight by 1000000 and cast the result to the int (If the weight is 1050042, kilograms would be 1050042/1000000 = 1)

Calculate the grams, subtract the kilograms from the weight, divide it by 1000 and cast the result to the int (If the weight is 1050042, grams would be int((1050042 - (1 * 1000000)) / 1000) = 50)

Calculate the milligrams, subtract the kilograms and grams from the weight (If the weight is 1050042, milligrams would be 1050042 - ((1 * 1000000) + (50 * 1000)) = 42)

Print the weight, kilograms, grams, and milligrams in the required format

3 0
2 years ago
Mary and Billy are moving away to college and both know in their hearts that they need to end their relationship. They move away
ivanzaharov [21]

In the case of Mary and Billy, the above is called Negotiated farewell.

<h3>What is Negotiated farewell?</h3>

In the case of  Negotiated Farewell, one can say that couples are knonw to jointly create the story of the end to what we say their marriage.

Note that Negotiated Farewell is one that is made for emotionally immature or any kind of combative people. hence, In the case of Mary and Billy, the above is called Negotiated farewell.

Learn more  about relationship from

brainly.com/question/10286547

#SPJ1

4 0
1 year ago
Other questions:
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • Given a int variable named yesCount and another int variable named noCount and a char variable named response, write the necessa
    9·1 answer
  • Clip art, by default, is formatted as a(n) ____, which cannot be moved to a precise location on a page.
    14·1 answer
  • Which of the following actions would help people determine their interests?
    11·1 answer
  • What is secondary exchange ? - Apex
    14·1 answer
  • The optional feature in a business letter is
    10·1 answer
  • ____ the styles allows the designer to start from a known baseline, confident that no unwanted styles will creep in from any bro
    6·1 answer
  • Tạo thủ tục có tên _Pro04 để trả về số lượng tổng thời gian tham gia dự án Y của nhân viên có mã số X, với X là tham số đầu vào,
    5·1 answer
  • State differences between title bar and menu bar​
    5·1 answer
  • PowerPoint Online automatically saves your presentation to what Office Online application?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!