• Register
0 votes
101 views

Problem :

Need solution for bellow problem statement 
print the data members of inventorytag. ex: if item_id is 314 and quantity_remaining is 500, print:
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Please find bellow the solution for your problem statement.

#Printing the data members of InventoryTag. Ex: if item_id is 314 and quantity_remaining is 500, print: ID: 314 Qty: 500

class InventoryTag:

def _init_(self):

self.quantity_remaining = 0

self.ID = 0


 

red_sweater = InventoryTag()

red_sweater.item_id = 314

red_sweater.quantity_remaining = 500

print("qty of inventory remaining")

print("%s is %d" %("ID", 314),end= " ")

print("%s is %d" %("quantity_remaining", 500))

9 7 4
38,600 points

Related questions

1 vote
1 answer 12 views
12 views
Problem: How to fix this error : print the number of common factors of a and b in c
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 3 views
3 views
Problem: How can I deal with this problem : print all permutation of string both iterative and recursive way in java
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 3 views
3 views
Problem: Please help me to solve it out : print even and odd numbers using threads in java
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: I need a help , How I can fix this : print all permutations of a string
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 1 view
1 view
Problem: How to fix this error : print all permutations of a string java
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: Can anyone tell me the solution of this problem? print all permutations of a string with duplicates
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: Can someone please help fix this uncaught error : print diagonal elements of matrix in java
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: Can anyone tell me the solution of this problem? print top view of a binary tree
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: Can anyone tell me the solution of this problem? print in the same line python
asked Apr 1 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 1 view
1 view
Problem: Can someone please help fix this uncaught error : print on the same line python
asked Apr 1 MUHAMMAD MUNEEB 83k points