Answer:
product_name = input("Enter product name : ")
if product_name=="pen"or"book"or"box"or"pencil"or"eraser":
if product_name == "pen":
amount = 10
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "book":
amount = 100
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "box":
amount = 150
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "pencil":
amount = 5
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "eraser":
amount = 8
print(f"Product Name: {product_name}\nCost: {amount} rupees")
else:
print("Item not found!")
Explanation:
The python program is a code of nested if-statements that compares the input string to five items of the first if-statement. For every item found, its code block is executed.
Answer:
Explanation:
If we want to apply styles with CSS code we must add the links of those documents, this method even we can use it in a local website to test before to upload to the server, It is the most recommended method, but we can apply the style in the HTML div or other HTML boxes, but with links, we can make a big CSS structure and then only use IDs or classes.
<h2>Option D: a call to a private method of the superclass</h2>
Explanation:
Option a: a method with the "same signature" is allowed in the subclass. There will not be any confusion because the object which is trying to call the method will decide whether to call the sub class or super class.
Option b: a call to a super class constructor is possible because, when you create an object of sub class automatically the super class constructor will be called. Even the sub class constructor can call the super class constructor explicitly.
Option c: A subclass can create method that's not defined by the super class
Option D: a private method is private inside the class and hence even the object of that class cannot access.
Your answer is easy just put 2
Answer:
<body>
Explanation:
the content of the web page must be body.