Question: 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)
 Input values status1, location1 and username1 are read from input, representing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!