Answer:
Explanation:
def computeCommission(salesAmount):
commission=0
if salesAmount <= 50000:
commission = 5000*0.08 + (salesAmount-5000)*0.1
elif salesAmount > 50000:
commission = 5000*0.09 + (salesAmount-5000)*0.12
return commission
print("commission for 45000 : "+str(computeCommission(45000)))
print("commission for 54000 : "+str(computeCommission(54000)))
Answer:
public class Main
{
public static void main(String[] args) {
int [][] a = new int[4][5];
a[0][0] = 1;
a[0][1] = 2;
a[0][2] = 3;
a[0][3] = 4;
a[0][4] = 5;
a[1][0] = 10;
a[1][1] = 9;
a[1][2] = 8;
a[1][3] = 7;
a[1][4] = 6;
a[2][0] = 11;
a[2][1] = 12;
a[2][2] = 13;
a[2][3] = 14;
a[2][4] = 15;
a[3][0] = 20;
a[3][1] = 19;
a[3][2] = 18;
a[3][3] = 17;
a[3][4] = 16;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 5; j++){
System.out.print(a[i][j] + " ");
}
System.out.print("\n");
}
}
}
Explanation:
- Inside the main method, initialize the 2D array with their respective values at the appropriate indexes.
- Iterate over the 2D array using a nested For loop.
- The outer loop iterates over the rows, while the inner loop iterates over the columns of the 2D array respectively.
- Finally inside the nested For loop, print the value of 2D array using the i and j index.
Output:
1 2 3 4 5
10 9 8 7 6
11 12 13 14 15
20 19 18 17 16
1. Because you can get the same features for a better price
2. CPU, GPU, RAM, Storage, OS, etc.
Answer:
Wikipedia
Explanation:
Most people go to other websites because they don't like to read the articles, they just want the information now, but Wikipedia has some of the most detailed articles on information to do with anything, and it's free to use.