Answer:
A) randomNumber = 0.70;
Explanation:
The code works perfectly for all values of randomNumber given in the options except option (a)
This is so because:
The first condition
<em>if (randomNumber <= 0.70) { event = 1; }</em>
It checks if randomNumber is less than or equal to 0.70. This is true, so event is set to 1.
However, the next condition after it will also be executed because it is a different conditional to be executed.
So, we have:
if (randomNumber <= 0.80) { event = 2; }
This condition is also true, so event is set to 2.
From the question randomNumber is meant to be event 1. However, this is different from the result of executing the code.
Hence, (a) is true
Answer:
Equity Shares are commonly called Common shares and have both advantages and disadvantages over Preference shares.
- Equity shareholders are allowed to vote on company issues while preference shareholders can not.
- Preference shareholders get paid first between the two in the case that the company liquidates from bankruptcy.
- Preference shareholders get a fixed dividend that has to be paid before equity share dividends are paid.
- Preference shareholders can convert their shares to Equity shares but equity shareholders do not have the same courtesy.
- Preference shares can only be sold back to the company while equity shares can be sold to anybody.
Answer:
The end parameter basically prints after all the output objects present in one output statement have been returned. the sep parameter differentiates between the objects.
Explanation:
Hope this helps
https://www.edureka.co/community/53505/difference-between-end-and-sep#:~:text=end%20and%20sep%20are%20optional,parameter%20differentiates%20between%20the%20objects.