This file contains hidden or 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
name = input("What is your name") | |
# take input from the user and save it in the name variable as string | |
# print the name | |
print(name) |
This file contains hidden or 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
# create a string variable | |
name = "Padmashree" | |
# print string variable | |
print(name) | |
# create a float variable | |
float_number = 4.5 | |
# print float variable |
This file contains hidden or 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
i_am_programmer = True | |
# The above example creates a variable and assigns it as True | |
i_am_not_a_programmer = False | |
# The above example creates a variable and assigns it as False | |
# or you can do this | |
i_am_programmer = bool(1) # 1 or any number except 0 | |
i_am_not_a_programmer = bool(0) # 0 is the only number which can assign False |
This file contains hidden or 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
name = "Chuck Norris" | |
# or use this | |
name = 'Chuck Norris' | |
# so the difference is of the type of qoutes | |
# have fun |
This file contains hidden or 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
number = 9.5 | |
# or you can do this | |
number = float(9) | |
# the above line converts nine from int to float and then save it in the number variable | |
# or even this can be used | |
number = 9.0 | |
# in the above line we have added a decimal point so it is converted into a float |
This file contains hidden or 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
number = 9 | |
# or use this | |
number = int(9) |
This file contains hidden or 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
# make integer variable | |
number = 89 | |
print(type(number)) | |
# <class 'int'> | |
# make float variable | |
decimal_number = 9.7 |
This file contains hidden or 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
# Adding Division Started | |
# add integers | |
print(34 + 67) | |
# add float | |
print(34.5 + 67.5) | |
# add integer with float | |
print(3 + 4.5) |
This file contains hidden or 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
# print string | |
print("Hello World") | |
# print int | |
print(3) | |
# print float | |
print(3.5) | |
# print boolean |
This file contains hidden or 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
import os | |
from datetime import datetime | |
from shutil import move | |
file_paths = [] | |
counter = 0 | |
print("If you want all the excel file, for example write .xlsx") | |
inp = ".png" | |
thisdir = os.getcwd() | |
print(datetime.now().strftime(("%H:%M:%S"))) | |
for r, d, f in os.walk("C:\\"): |