Try to create a function that will prefix a given character array with "|.." and postfix it with "..|". The character section should always be atleast 2 symbols, use '.' to fill up remaining spaces if needed. (so that would be if the supplied character array has size 0 or 1) You could then create a loop to call this function with an array and call it with size 0, 1, 2 and 3 using the same array.. ('c','h' and 'm')
It's fine to use. math.h might define M_PI but this is only if
is defined. As a result some implementation might not have it either I think. If it does have it and it's defined, you wouldn't be able to define M_PI yourself when including math.h unless you use shady compiler-specific intructions to temporarily disable the definition like this:
math.h might define M_PI but this is only if __STRICT_ANSI__
Everything in this statement is making an assumption about the implementation. Neither M_PI nor __STRICT_ANSI__ are required by the C standard. M_PIis a common extension though, so it would be best to safely define it if you use it in portable code:
#define M_PI 3.1415926535
And because both PI and M_PI have well established meanings, it would be unwise to use those names as anything but a constant for the value of pi. Or at most a working variable that eventually ends up at an approximation of pi.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: