Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input values status 1 , location 1 and username 1 are read from input, representing the status, location, and username of a profile. An element

Input values status1, location1 and username1 are read from input, representing the status, location, and username of a profile.
An element representing a new status is also read from input as new_status. Complete the following tasks:
Assign profile1 with an instance of Profile with status1, location1 and username1 as attributes in that order.
Call profile1's print_data().
Call profile1's update_status() with argument new_status.
Call profile1's print_data() again.
Click here for example
Ex: If the input is:
active
Oregon
tan-vulture
busy
then the output is:
Profile data: active, located in Oregon, user tan-vulture
Profile data: busy, located in Oregon, user tan-vulture
class Profile:
def (self, status, location, username):
self.status = status
self.location = location
self.username = username
def update_status(self, new_status):
self.status = new_status
def print_data(self):
print(f'Profile data: {self.status}, located in {self.location}, user {self.username}')
status1= input ()
location1= input()
username1= input()
now ctatlic - innutr)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago