Skip to content

Commit

Permalink
looping program
Browse files Browse the repository at this point in the history
  • Loading branch information
linrakesh committed Jan 27, 2020
1 parent 21af134 commit 0a062b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Loops/cube_of_digit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
x = input('Enter any number ')
sum = 0
for i in x:
y = int(i)
a = y**3
sum = sum+a

print(sum)
1 change: 0 additions & 1 deletion Tools/csv_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
for y in range(len(row)):
element[keys[y]] = row[y]
data.append(element)

count = count+1

print(json.dumps(data,))
2 changes: 1 addition & 1 deletion Tools/csv_to_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
pdf = FPDF(orientation='P', unit='mm', format='A4') # P -potrait L-Landscape
pdf.add_page()
pdf.set_font("Arial", size=12)
pdf.cell(200, 10, txt=str(data), ln=1, align="C")
pdf.cell(200, 10, txt=str(d), ln=1, align="C")
pdf.output("simple_demo.pdf")

0 comments on commit 0a062b9

Please sign in to comment.