Wiki is the correct answer
Answer:
Explanation:
The following code is written in Java. The function takes in the random object and creates a random number where it generates a random number and prints out the * characters, if the random number and the input num are the same it prints out both values and ends the function.
import java.util.Random;
class Brainly {
public static void main(String[] args) {
Random r = new Random();
randomStar(r, 12);
System.out.println();
randomStar(r, 19);
}
public static void randomStar(Random r, int num) {
while (true) {
int randomNum = r.nextInt(19) + 5;
if (randomNum != num) {
for (int x = 0; x < randomNum; x++) {
System.out.print("*");
}
System.out.print("\n");
} else {
for (int x = 0; x < randomNum; x++) {
System.out.print("*");
}
System.out.print("\n");
System.out.println("Random Number: " + randomNum);
System.out.println("Input Number: " + num);
break;
}
}
}
}
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)))
Yes yes I can get sum it tho I don’t wanna know how I can do that I don’t have a problem I
Answer:
4 basic components
Explanation:
Networks are comprised of four basic components: hardware, software, protocols and the connection medium. All data networks are comprised of these elements, and cannot function without them.