# print the data members of inventorytag. ex: if item_id is 314 and quantity_remaining is 500, print:

97 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:

## Solution :

#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))

## Related questions

122 views
As I analyzed it I have arrived on a conclusion but I don't think that its gonna work so I would appreciate if you correct it. If I want to enter a number again to be added on the sum variable what can be the decision ? Start Initialize counter = 0 , sum = 0 Input N N % 3 == ... else if counter != N { If true , loop back to " Input N " else print sum } else , N not divisible by 3 . Print sum End
15 views
Briefly explain in java to how one should print the matrix with a simple example.
1 vote
26 views
Problem: Hello Guys, I am a new member of this forum. I recently started learning computer programming and I started with Python. One of my friends recommended this forum, and here I am! Anyway, I have come with a very fundamental question and its a must to answer. What is stderr and how do you usee it in Python? Thanks for your answers. I must recognize your help.
1 vote
42 views
Problem: Hello Kodlogs, I am here with a problem. This could be a simple problem for you, guys, but it&rsquo;s driving me crazy. I am in a situation that needs to print multiple values in a single line. Let me describe it in my words. Say, have some integer ... value in a different line and there is no option to concatenate them. Could you please help me out? Thanks for your concern and kind help.
1.7K views
Problems : Assign the size of userInput to stringSize. Ex: if userInput = "Hello", output is: Size of userInput: 5 #include <stdio.h> #include <string.h> int main(void) { char userInputArray[50] = ""; int stringInputSize = 0; strcpy(userInputArray, "Hello"); /* Your solution starts here */ printf("Size of userInputArray: %d\n", stringInputSize); return 0; }
12 views
6 views
Problem: Hello programmers! I am a beginner and I have got an assginement in which I have to write a program in Java that will take a number from user as input and will check whether the user entered an even number or an odd number. The program is to be written in ... and I have no idea how to check if a number is even or odd using a program. Any help from you would be much appreciated. Thanks