You are on page 1of 13

Computer Programming

Lab Rules

Every lab has some lab exercise(s) and a homework assign-
ment

Lab Exercises
– Submit your lab exercise(s) on google classroom before the end of the lab session
– Lab exercises submission on Google Classroom will be used as attendance for lab
sessions.
– If you complete the lab exercises early, you can start to work on your homework as-
signment

Homework Assignments
– You have 7 days to complete the homework assignment
– Submit your homework assignment on Google Classroom before deadline
– Deadline is Wednesday 11:59 pm
– You can ask question through my email (mderrick@g.skku.edu)
You can complete the homework assignment at home and submit it before the
– deadline

 Make sure you submit your exercises and assignments in the correct place!
Objectives for Lab #1

In this lab, you will:
 Introduction to the Python Idle platform
 Write and execute your first program in Python: The “Hello World” Pro-
gram.

The Python Software Foundation promotes Python as an easy-
to-learn, ubiquitous language.

Python is a useful language for implementing various applications


such as web development, scientific computing, and education,
and has also been used in Google and Instagram. It is a very
popular programming language

Source: http://www.itworld.co.kr/news/92103 Copyright © itworld


Pros and cons of Python language.

PROS CONS

1. Easy to read and use 1. It is relatively slow because it is an


interpreter language.
2. Used in Internet of
Things applications 2. There are some design limitations.
(IoT)
3. Easy to write asyn-
chronous Code.
4. It supports multi-para -
digm.
Source: http://www.itworld.co.kr/news/92103 Copyright © itworld
www.python
.org
Starting Python: The Python Shell
❖ “>>>” is the prompt

❖ Enter any python code

❖ Interpret and then execute one line at a


time
Lab Exercise: HelloWorld - Your first
python program

❖ A “HelloWorld” program is a computer program that


output “Hello, World!”
❖ https://en.wikipedia.org/wiki/%22Hello,_World!%22_program

❖ Always the first program you write when you learn a


new programming language or development plat-
form
❖ Python:
print (“Hello, World!”)
Saving Your Python Program
❖ Writing python program with more than one line of
code
❖ Write a program that output “Hello, World!”

❖ Save it is a file named HelloWorld.py

❖ Run the program


Three VERY important rules for
programming!!

❖ Backup your code

❖ Backup your code, again!

❖ Backup your code, once more!!!


❖ And save multiple version of your backup as you progress (e.g.
v1.0, v1.1, v2.0, etc)
❖ So that you can backtrack any potential mistakes/bugs
Lab Exercise

❖ Submit your HelloWorld program source code on


Google Classroom as Lab Exercise
» i.e. name_lab1.py (derrick_lab1.py)

» Deadline (for online session): before the end of today


Homework Assignment 1

❖ Write a program to display “Hello, World!” five times


❖ Submit your source code on Google Classroom as
Homework Assignment
❖ Save the Code as “name_hw1.py” (ie
“derrick_hw1.py)
❖ Submit the source code only (i.e. XXXXX.py)
❖ Deadline:
» Tuesday 24 March 23:59pm (But the
earlier the better)
You should submit your source
code only!
• Source code

Your code written in Python!

The “XXXXXX.py” file
• No grade will be given if you submit the output of your
program
• No grade will be given if you submit the screen cap-
ture of your
source code
• Double check your submission

Make sure you submit the correct file!

Questions can be directed to my email (
mderrick@g.skku.edu) and I’ll reply to you as soon as
I can

You might also like