This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#PIL (python image library) make sure you have PIL installed, otherwise install it from here my typing commnad ->pip install Pillow | |
#if you have PIL already you are good to go. | |
import os | |
from PIL import Image | |
def main(): | |
select_folder='C:\\Users\\atulc\\Downloads\\The Best Cars HD Wallpapers' #my first folder or source folder | |
dest_folder='D:\\my walls\\cars' #my destination folder | |
for image_path in os.listdir(select_folder): | |
print(image_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#webkul pattern program round 1 | |
#pattern runs for odd number like min 3 , 5, 7 etc | |
#here is ther pattern | |
#for n==3 | |
* * | |
** ** | |
***@@@*** | |
@@@ | |
@@@ | |
*** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#only runs for 1,3 and 5 | |
#pattern is | |
#n==5 | |
1 | |
232 | |
34543 | |
4567654 | |
567898765 | |
#for n==3 | |
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#for n==9 | |
* * * | |
* *** * | |
* ***** * | |
* ******* * | |
*---------*********---------* | |
* ******* * | |
* ***** * | |
* *** * | |
* * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pattern run for only off number like ->3,5,7,9,11 etc | |
#n==3 | |
*********** | |
* | * | |
* * * | |
*---***---* | |
#for n==5 | |
***************** | |
* | * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pattern runs for both odd and even number starting from n==3 | |
n==3 | |
* * * * * | |
* * * | |
* * * * | |
* * * * * | |
n==4 | |
* * * * * * | |
* * * | |
* * * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enter the height=3 | |
enter the width=3 | |
enter the number of stairs=3 | |
@@@ | |
@@ | |
@ | |
@@@ | |
@@ | |
@ | |
@@@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enter the height=3 | |
enter the width=3 | |
enter the number of stairs=3 | |
@@@ @@@ | |
@@ @@ | |
@ @ | |
@@@ @@@ | |
@@ @@ | |
@ @ | |
@@@ @@@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [[1, 2, 3, 4, 5, 6], | |
[7, 8, 9, 10, 11, 12], | |
[13, 14, 15, 16, 17, 18]] | |
int_row = 0 | |
last_row = 3 | |
int_col = 0 | |
last_col = 6 | |
while(int_row<=last_row and int_col<=last_col): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [[1, 2, 3, 4, 5, 6], | |
[7, 8, 9, 10, 11, 12], | |
[13, 14, 15, 16, 17, 18]] | |
int_row = 0 | |
last_row = 3 | |
int_col = 0 | |
last_col = 6 | |
while(int_row<=last_row and int_col<=last_col): |
OlderNewer