Skip to content

JustNunuz/STC-PYTHON-WORKSHOP-2020

Repository files navigation

🐍 STC-PYTHON-WORKSHOP-2020

Welcome to this beginner friendly walkthrough Python. The purpose of this lesson is to introduce you to Python and give you an overview on what Python can do. Check out the Sunway Tech Club's page right 👉here👈.

Topics Covered

  • Setting up your Python and Visual Studio Code
  • Input
  • Output
  • IF statements
  • Loops
  • Importing Libraries
  • File
  • Making something cool

🗺️ GETTING STARTED

STEP 2: MAKE YOUR FIRST PDF!

from fpdf import FPDF

pdf=FPDF()
pdf.add_page()
pdf.set_font("Arial",size=20)
pdf.cell(200,10,txt="This is line number 1",ln=1,align="C")
pdf.cell(200,10,txt="This is line number 2",ln=2,align="L")
pdf.cell(200,10,txt="This is line number 3",ln=3,align="R")
#Alignment is totally your choice

Adding an image

pdf.output("Demo1.pdf")
#"Demo" is just the name, the name can be anything you desire.

READY TO MOVE TO THE NEXT SESSION?

Additional Learning materials

Takayoshi Y once said

“I learned the fundamentals for programming, which is just what I needed as a first step for my career change!”

Releases

No releases published

Packages

No packages published

Languages