Answer:
# main function is defined
# the calculateAmount is called here
def main():
print("The new amount is: ", calculateAmount(), sep="")
# calculateAmount function that calculate the interest
def calculateAmount():
# the value of principal is p
p = 5000
# the value of rate is r
r= 2
# the time is t
t = 1
# the formula for finding interest
interest = (p * r * t) / 100
# the new amount is calculated
amount = p + interest
# the amount is returned
return amount
# a call that make main function begin execution
if __name__ == "__main__":
main()
Explanation:
The program is written in Python and it is well commented. A screenshot is attached showing program output
Answer:
You have to select the picture and pick the text at first.
Then press context menu key on a keyboard or right mouse button and choose group/ungroup point.
Choose group.
And finally you can select and resize the object and text simultaneously.
Answer:
input number
calculate modulus of the number and 5
compare outcome to 0
if 0 then output "divisible by 5"
else output "not divisible by 5"
Explanation:
The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.