Answer:
amount_to_change = int(input("Enter amount to change: "))
num_fives = amount_to_change // 5
num_ones = amount_to_change % 5
print("There are " + str(num_fives) + " five dollars and " + str(num_ones) + " one dollars in the change")
Explanation:
Ask the user to enter the amount_to_change
Calculate the number of five dollars, use floor division
Calculate the number of one dollars, use modulo operator
Print the number of five dollars and number of one dollars
The code is first declaring array1 as a new array of integers with length 25. Then the comment tells us that somewhere in the middle of the code, values are given to each element of array1.
Lastly, we are iterating through the array using a for loop. We start at index 0, and continue until the index value (a) is one less than the length of the array. So array1[a] will give us the value that was assigned to the element at index a.
In the for loop, we are adding the value of array[a] to the integer "value" which was initialized as 0. Therefore, the result will be the sum of all the integers in array1.
Answer:
u can try to reset your computer or charge it or u could close the tabs that u dont need
It is called a dynamic array
School sucks, but I'm here anyway.