How to make right looping through while?
I am trying to make looping. I want an output of number from 1-10 squared. Here is my code. What is wrong? for num in range(1, 10): print (num) while num < 100: num = num ** 2 print(str(num))
Printing 1 to 10 squared would be like this: for num in range(1,11): print (num ** 2) But if you wanted to print the number first and then the squared result you could do it like this for num in range(1,11): print (str(num) + ": " + str(num ** 2)) These are only suggestions, hope I helped!
Why there are more python processes than the number of cores in Spark?
Filling in a completely empty list of lists in an arbitrary order
How to create random orthonormal matrix in python numpy
Fill an image with pre-defined pattern with Wand
How to use a post_save receiver with django-polymorphic?
giving a name to a pandas dataframe?
mistake comparing datetime, python
numpy testing assert array NOT equal
How to join threads of an asyncio executor runned inside coroutine?
Google Admin SDK insert custom schema using python
Importing images for manifold Isomap
Having nosetests watch files from outside container and rerun tests inside container
Trying to ftp from my system to remote server
Attribute in a Class immediately runs at the wrong time?
Unable to handle “HTTP Badstatus line” exception
How to merge/join two resultset/table in django?