ENGG1003_Lab01_Fun_with_Python
ENGG1003_Lab01_Fun_with_Python
3
Setup and Use Your Own
VM
Got an invitation email recently?
Check your CUHK @Link Outlook email inbox
See luck in your spam/junk mail folder?
From: Microsoft Azure <azure-
[email protected]>
Subject: Register for Lab – ENGG100...
4
Yours is a Windows 11 VM
pythonIDLE
and wait…
5
Working Environment
Work on the white IDLE Shell
window
6
Try Simple Python
Commands Interactively
Launch the installed app IDLE (Python) and try:
7
Try Simple Python
Commands Interactively
What do you see on entering this command?
copyright
8
Calculate Body Mass Index
(BMI) immediately
where weight in kg, height in m
Try the following commands:
10
Create a New File (Code Editor)
Mac User
11
Type Your Code, Customize with
your own SID, name and BMI
13
Windows User
File Save [Ctrl+S]
14
Windows User
New folder
15
Windows User
Create New Folder
ENGG1003
16
Windows User
Save to File
ENGG1003_lab01.py
ENGG1003_lab01.py
17
Mac User
File Save OR
Run Run Module Save? Dialog
18
Mac User
Where: Create Folder
Save to File ENGG1003_lab01.py
19
Focus (Click) the Editor Window
Run Your Work (Hot-key F5)
20
More – Turtle Graphics
Have Fun!!
Python can handle not only numbers and text,
but also graphics!
All your files and works will be persistently kept on your own VM in the
cloud till the end of the term
Shall you RESET your own VM, all data stored on your VM will be LOST!!
23
Extras for Fun – Color
Spiral
Download and Run the given file spiral.py
24