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
If you create and invoke a recursive function without accounting for a base case, what can go wrong?
oksian1 [2.3K]

Every recursive function should have an exit criterion (=handling the base case) to exit the recursion.

Without it, it wil recurse forever, until system resources run out (typically the call stack will overflow and your program will crash).

6 0
3 years ago
Can someone pelaseee help
aalyn [17]

Answer:

Explanation:

develloppemetn de grace en option est logiquement une biologiste experimenter des annes 1256 a toulouse en france

6 0
2 years ago
Which words in the sentence make up the adjective phrase? Which word does the adjective phrase modify? The farmer delivers five
jasenka [17]
B....."........."........"...
6 0
3 years ago
The Zapper gun was an accessory for which game console?
Vladimir [108]
Nintendo Entertainment System
5 0
3 years ago
Read 2 more answers
A persons decision to take action without being asked is
Nimfa-mama [501]

Answer:

Initiative

Explanation:

Initiative: the power or opportunity to act or take charge before others do.

5 0
3 years ago
Other questions:
  • When you enter a two-digit year that is less than 30, Excel changes the year to _____. Question 7 options:
    7·1 answer
  • Match the software requirements of a server to their purpose
    5·1 answer
  • Write code that inserts userItem into the output string stream itemsOSS until the user enters "Exit". Each item should be follow
    5·1 answer
  • Evaluating how current, credible, and unbiased a source is ensures:
    7·1 answer
  • How can you ensure you don't go over your budget?
    8·1 answer
  • You are an IT technician at your company. The company has two small offices in different cities. The company's head office conta
    5·1 answer
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • Es la actividad que posibilita comunicar gráficamente ideas, hechos y valores procesados y sintetizados en términos de forma y c
    11·1 answer
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
  • Will economists be replaced by artificial intelligence?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!