![]() Iterative Calculation starting from index 1 Set limit of table, to which extent we wish to calculate table for desired number lim = int(raw_input("Enter limit of table")) Taking input from user as an integer num = int(raw_input("Enter your number")) I = ))+1) for j in i]Ĭreating Arithmetic table is much simpler but i thought i should post my answer despite the fact there are so many answers to this question because no one talked about limit of table. ![]() max_width = len(str(m)) + 1Īnd demonstrate the elasticity of the spacing with a different size, e.g. Using the default argument of ' ' for the fillchar. Of one larger than the largest integer in the list of lists (the last integer), ![]() We should convert them into strings that are right justified with a width ![]() Now that we have a list of list of integers that is in the form that we want, I went for the approach of constructing a list of list of integers first, using the range function and taking advantage of the step argument. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |