Answer:
private void printArray(int[] arr){ //0
System.out.print("["); //1
for(int k : arr){ //2
System.out.print(k + ", "); //3
}
System.out.println("]"); //4
}
Explanation:
This method should get you started. Your teacher may want a different format or a different type of loop. If you haven't learned for loops yet don't use them that'd be suspicious ;)
What I did:
0: This is the method heading with one parameter for the 1D array. If you need to access it in a different class change private to public.
1: This prints the [ with no line break
2: This is an enhanced for loop to iterate through each element in a 1D array. Alternatively, a normal for loop looks like this:
for (int i = 0; i < arr.length; i++)
instead of retrieving the variable with the enhanced for, you'd have to use arr[i] instead of k in this scenario.
3: This prints the value in each pass of the loop along with a comma and a space.
4: This adds the ] with a line break when the loop is completed
Hope this helps you get started :D comment if you need further help
Answer:
actual_value = float(input("Enter the actual value of a piece of property: "))
tax_rate = float(input("Enter the current tax rate for each $100.00 of assessed value: "))
assessed_value = actual_value * 0.6
tax = (assessed_value * tax_rate) / 100
print("The annual property tax is $" + str(tax))
Explanation:
*The code is in Python.
Ask the user to enter the actual value and the tax rate
Calculate the assessed value, multiply the actual value by 0.6
Calculate the tax, multiply the assessed value by the tax rate and divide result by 100
Print the tax
D. <span>use clear, short paragraphs.</span>
Well it depends if your thinking! I know many reasons why people should get married but I also know many reasons why people shouldn’t get married!
For an example if you are a man and you don’t want to get married, well I think it’s 50% wrong and another 50% right cause if you want to enjoy life and not be stuck with the same wife you wouldn’t get married, but now think of having a family when you get married you receive a blessing, cause you will have son , daughters and a wife who will support you all the time!