Note: If only one parameter is specified, that parameter is classified as the stop parameter, while the start and step parameters are taken as 0 and 1, respectively. Step: The step size by which we want to increment or decrement our series. We iterate over the series while executing some lines of code until we arrive at the last number in the series. The range() function allows us to create a series of numbers automatically. Its presence makes our code more interactive. prompt: A string enclosed in single or double-quotes.If the required data type is not explicitly defined, any value provided by the user at the prompt is stored in memory as a string. The input() function is used to accept input from the user. In Python, we can create a multiplication table for any number by combining the input() and range() functions with a loop statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |