Kernel
operating system is the general scope, but more specifically it is the kernel.
Answer:
Assuming your using the language python, The 'or' operator
Explanation:
To explain this further, or is used in python to describe another condition whether the first one was true or false. Here is a list of what they all briefly mean:
Object-Oriented Programming allows you to create objects with specific characteristics. Ex. you could have a dog class that describes a dogs name and breed. You can make an instance and call it Max with its breed being a golden retriever etc.
----------------------------------------------------------------------------------------------------------------
Procedures independant code that just has simple instructions
----------------------------------------------------------------------------------------------------------------
Functions like object oriented programing but instead of having attributes it is a block of code that does an action. In python, unless the function is called, however, it won't do anything
----------------------------------------------------------------------------------------------------------------
'or' allows someone to give another condition whether the other conditions were True or False.
hope this helped :D
Answer:
D.Maintain a count of queue items.
Explanation:
In array based implementation of queue we use two variables suppose frontindex and rearindex which points to the front of the queue and the rear of the queue respectively and one variable size to keep count of the variables in the queue So whenever we insert an element we insert it at rear index and whenever we remove an element we do it at front index.When the size becomes equal to the capacity of the array we can say that the queue is full.
Answer:
no_of_shares = int(input("Enter the number of shares: "))
purchase_price = float(input("Enter the purchase price of the stock: "))
sale_price = float(input("Enter the sale price of the stock: "))
total_stock_price = purchase_price*no_of_shares
total_spend_on_buying = total_stock_price + (0.03*total_stock_price)
total_sale_price = sale_price*no_of_shares
commission_while_selling = total_sale_price*0.03
net_gain_or_loss = total_sale_price - (total_spend_on_buying + commission_while_selling)
if(net_gain_or_loss<0):
print("After the transaction, you lost {} dollars".format(abs(net_gain_or_loss)))
else:
print("After the transaction, you made {} dollars".format(abs(net_gain_or_loss)))
Answer:
Output of the given code is: 10 20 30.
Explanation:
Here in function find(int a, int& b, int& c), three parameters are passed, firstis passed by value and rest are passed by reference. When a parameter is passed by value, the any changes made by the other function doesn't reflects in the main function.And when a value is passed by reference, then any changes made by other function will reflects in the main function also.
Here find is called with (10,20,25).So in the function, c=a+b i e. c=10+20.Here b,c are passed by reference. So any change in b,c will change the value of y,z in main. temp=10,then a=b i.e a=20, and b=2*temp That is b=2*10.Here value of a=20, b=20 and c=30.Since b,c are passed by reference then it will change the value of y, z in main function but a will not change the value of x.
Hence the value of x=10, y=20 and z =30 after the function call.