Answer:
Border
Explanation:
When adding a component to a container with the BORDER layout, specify the NORTH, EAST, SOUTH, WEST, or CENTER position.
Answer: knowing what you spend".
Explanation:
The reason to use cash for making purchases is to know how much one has spent.
When we use cash rather than using credit card, it's easier for one to know how much that has been spent. Also, one can easily know when he or she need to stop spending. Therefore, the correct answer is "knowing what you spend".
Answer:
coupons = int(input("Enter the number of coupons you win: "))
candy_bars = int(coupons / 10)
gumballs = coupons % 10
print("Candy bars: " + str(candy_bars) + ", Gumballs: " + str(gumballs))
Explanation:
*The code is in Python.
Ask the user to enter the number of coupons
Calculate the number of candy bars, divide the coupons by 10 and typecst the result to int
Calculate the number of gumballs, use the modulo to find the remainder
Print the values
Answer:
The program in Python is as follows:
word = input("Word: ")
if len(word) < 5:
print("At least 5 characters")
else:
pal = word[0:5]
word = word[0:4]
word = word[::-1]
pal+=word
print(pal)
Explanation:
This gets the word from the user
word = input("Word: ")
This checks if the length of the word is less than 5.
if len(word) < 5:
If yes, this tells the user that at least 5 characters is needed
print("At least 5 characters")
If otherwise
else:
This extracts the first 5 characters of the word into variable named pal
pal = word[0:5]
This extracts the first 5 characters of the word into variable named word
word = word[0:4]
This reverses variable word
word = word[::-1]
This concatenates pal and word
pal+=word
This prints the generated palindrome
print(pal)