Professional Documents
Culture Documents
For in If and Elif and Elif and Else: "Enter A String"
For in If and Elif and Elif and Else: "Enter A String"
upper=0
lower=0
special=0
number=0
for i in n:
if i>='65' and i<='90':
uper+=1
elif i>='97' and i<='122':
lower+=1
elif i>='48' and i<='57':
number+=1
else:
special+=1
print(upper)
print(lower)
print(special)
import random
class Dice:
def roll(self):
first=random.randint(1,6)
second=random.randint(1,6)
return first,second
p=Path()
y=p.glob('*.py')
for file in y:
print(file)
p=Path("h1")
print(p.exists())
p=Path("eccomerce")
print(p.mkdir())
p=Path("eccomerce")
print(p.rmdir())
O/P
app.py
functions.py
str.py
True
None
None
import openpyxl as xl
from openpyxl.chart import BarChart,Reference
wb=xl.load_workbook('transactions.xlsx')
sheet=wb['Sheet1']
values=Reference(sheet,
min_row=2,
max_row=sheet.max_row,
min_col=4,
max_col=4)
chart=BarChart()
chart.add_data(values)
sheet.add_chart(chart, "e2")
wb.save("trans1.xlsx")