Answer:
Hi there Tonyhh! Please find the implementation below.
Explanation:
You can save the below code in a file called "price_discount.py". The code is implemented in python 2.0+. To make it work in Python 3.0+, simply update the code to use "input" rather than "raw_input".
price_discount.py
def calculate_discount(price, quantity):
total = 0.95 * price * quantity;
return total;
price = raw_input("Enter a price: ");
try:
price = int(price);
while price <= 0:
print("Input a valid number: ")
price = raw_input("Enter a price: ");
quantity = raw_input("Enter a quantity: ");
try:
quantity = int(quantity);
if quantity >= 10:
print(calculate_discount(price, quantity));
except ValueError:
print("Invalid quantity!")
except ValueError:
print("Invalid input!");
price = -1;
In the case above, the the new subnet mask in prefix format is seen in IPv6 and in IPv4.
<h3>What is
subnet prefix mask?</h3>
A lot or a single computer that is known to be linked to a subnet is said to shares a kind of an identical part of the IP address.
Note that this shared information is said to be called the routing prefix, and in IPV4 (Internet Protocol Version 4), the routing prefix is said to be called a subnet mask.
Hence, The the new subnet mask in prefix format is seen in IPv6 and in IPv4 because that is the format that it always comes in.
Learn more about subnet from
brainly.com/question/8907973
#SPJ1
<span>Assuming that the language is C++ and that the following variables exist:
bonusscores is an array of some numeric type (float, double, int, etc).
nent is an integer indicating how many elements are in bonusscores.
Also assuming that the array is 0 based, so legal subscripts range from 0 to nent-1.
// Code starts here
for(int x = 0; x < (nent-1); ++x) {
bonusscores[x] = bonusscores[x] + bonusscores[x+1];
}
// Code ends here
Thing to note, since the last element isn't modified, the range for the for loop is reduced by 1 so that every element to actually be modified is visited, but the last element isn't. And since each element after modification isn't needed for future modifications, it's safe to change them in situ.</span>
The left side is a shortcut for 'Enter' the small wheel in the middle is used to scroll your view of the object,The right is used to intialize options pop-up to edit or initiate commands of the intended target