Wednesday, May 15, 2024

Diploma Python Programming - Module 01 - Alison 03

KIta lanjutkan summary dari kursus Alison, dimana topik kali ini adalah programming dengan memakai bahasa Python. Kita juga memakai bahan kursus dari freeCodeCamp.org - YouTube dan berbagai sumber.


Image - Python Programming (credit to Google)

Module 1:
Introduction to Python programming: Python an Introduction - Online Course | Alison

Lesson Summary: 
There are plenty tools for Visual Studio Code (VSC).
GeekTrainer: https://aka.ms/intropythoncode
 



The key points from this module are: 
  • The Basic principle of programming is that it is problem solving.
  • Python is one of the easier programming languages to learn, and many of its tools are free to download and use.
  • One you learn how to code in one programming language it will be easier to learn other programming languages, as the principles are the same.
  • There are a lot of different variations of Python, IronPython, Ipython, CPython to name a few. Most of python’s variations only have some syntax differences but not too many.
  • Comments are very useful in your code to help you or someone else understand:- What your program does,- What a particular line or section of code does;- Why you chose to do something a particular way;- Anything that might be helpful to know if you or someone else looking at the code later and trying to understand it.
  • The # is the symbol to indicate using comments in python.

After completing this module, you will be able to:
  • Identify how to use the print() function to display text.
  • Recognize the different methods of using quotes to contain your text in the print function.
  • Identify process of making mistakes in programming and different solutions to help find and resolve mistakes.

Next Lesson : Module 2 Displaying Text: Displaying Text - Online Course | Alison

=====================================================
=====================================================

Dave Gray

Sekarang, kita belajar tentang Functions in Python

kabar() ..> Bukan functions
def kabar():
    print("Apa Kabar")

kabar ()
Run Python File:
Apa Kabar

apa kabar_() ..> functions
def kabar_apa():
    print("Apa Kabar")

kabar_apa()
Run Python File:
Apa Kabar ...> hasilnya sama, jika tanpa functions

Integer
def kabar_apa():
    print("Apa Kabar")

kabar_apa()

def sum(num1, num2):
    print(num1 + num2)

sum(2, 3)
sum(1, 7)
sum(100, 3)
Run Python File:
Apa Kabar
5
8
103

Parameters
def sum(num1, num2):
    print(num1 + num2)


Arguments (2,3...) ...> Functions (sum)
sum(2, 3)
sum(1, 7)
sum(100, 3)

None ...> No False, No True, just None



JJJJJJJJJJJJJJJJ
JJJJJJJJJJJJJJJJJJ

No comments:

Post a Comment