0% found this document useful (0 votes)
24 views

ACTIVITY 1: Executing A Python Program and IDE: T-CPET121LA - Introduction of Computational Thinking

This document provides instructions for running Python programs in different environments: 1. Immediate mode - Running Python syntax directly in the Python shell command line. 2. Script mode - Executing a Python program written in a .py file using the command line. 3. Using an IDE (Python IDLE) - Writing and running Python code using the integrated Python IDE. 4. Using an IDE (PyCharm) - Writing and running Python code using the PyCharm IDE. The student is asked to follow the steps, make observations about executing code in each environment, and provide a short conclusion.

Uploaded by

Endai Desu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

ACTIVITY 1: Executing A Python Program and IDE: T-CPET121LA - Introduction of Computational Thinking

This document provides instructions for running Python programs in different environments: 1. Immediate mode - Running Python syntax directly in the Python shell command line. 2. Script mode - Executing a Python program written in a .py file using the command line. 3. Using an IDE (Python IDLE) - Writing and running Python code using the integrated Python IDE. 4. Using an IDE (PyCharm) - Writing and running Python code using the PyCharm IDE. The student is asked to follow the steps, make observations about executing code in each environment, and provide a short conclusion.

Uploaded by

Endai Desu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

De La Salle University - Dasmariñas 1

CEAT – Engineering Department

T-CPET121LA – Introduction of Computational Thinking


ACTIVITY 1: Executing a Python Program and IDE
Name: __________________________________
Year and Section: _________________________ Date: ______________ Rating:

Objective: Be familiar with running a python program; and using python IDE.
Instructions: Follow the following procedure to observe the different ways in executing a python
program. Write your observation in the answer sheet provided.

OBSERVATION A: ________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

OBSERVATION B: ________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

OBSERVATION C: ________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

OBSERVATION D: ________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

OBSERVATION E: ________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

CONCLUSION: ___________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

T-CPET121LA
Introduction to Computational Thinking
De La Salle University - Dasmariñas 2
CEAT – Engineering Department

IMMEDIATE MODE – running a python syntax in python command line


1. Open the python shell. Depending on the version, it is IDLE Python(3.7.2). A window will appear
on your screen as shown below.

2. Type print(“Hello World”) and press enter


button in your keyboard.
3. Type 1 + 10 and press enter button in your keyboard.
4. Type quit() and press enter button in your keyboard.
Click Yes in the pop up window

OBSERVATION A: (Use the answer sheet)

SCRIPT MODE – execution of a python program written in a file. A python program file has an
extension file of .py
5. Close your program
6. Open any text editor (Notepad)
7. Type print(‘Hello World’)
8. Save your file in your desktop and name it as Sample.py
9. Open your windows command line
10. Using command line, locate to your desktop where your python file is saved. If you are not familiar,
type cd desktop and press enter key.
11. Now you are in desktop directory, type dir and press enter key. Check if your python file is inside
the desktop.
12. Type Sample.py and press enter key
13. Modify your python file. On your desktop, right click your python file and select Edit with IDLE.
14. Modify your code to print(Hello World)
15. Using command line, execute the python file.

OBSERVATION B: (Use the answer sheet)

USING IDE (Python IDLE) – IDE means Integrated Development Environment that is used for typing
and executing python syntax. Python IDLE is a IDE installed along the python programming language.
16. Open the python shell
17. Click the tab File > New File
18. A window will appear as shown below

19.Type print(‘Hello World’)


20.Save your file in your desktop and name it as Sample.py
21.Click the tab Run > Run Module or press F5
22.Modify your code to print(Hello World)
23.Save your python file
24.Run your program

OBSERVATION C: (Use the answer sheet)

USING IDE (PyCharm) – PyCharm is one of the famous python IDE develop by JetBrains.

25. Open your PyCharm Community Ediiton


26. A window will appear as shown in the next image
27. Click Create New Project

T-CPET121LA
Introduction to Computational Thinking
De La Salle University - Dasmariñas 3
CEAT – Engineering Department

28. Type Tester (to change the untitled project


name) then click Create button.
29. Close any pop up window that will appear (Tip
of the day)
30. A window will appear as shown in the next
image
31. On the left corner of the screen, you will see
your project folder. Right click it and select New >
Python File
32. Type Program_A and click the Ok button
33. Type print(‘Hello World’)
34. On the menu tab, click Run > Run and select
the Python file you have created.
35. Modify your code to print(Hello World)
36. Run your program again

OBSERVATION D: (Use the answer sheet)

37. Execute the following python code


print('ABCD','EFGH')
print('IJKL','MNOP','QRST')

38. Execute the following python code


print('ABCD','EFGH')
print('IJKL\tMNOP\tQRST')

39. Execute the following python code


print('ABCD','EFGH')
print('IJKL\nMNOP\nQRST')

40. Execute the following python code


print('ABCD','EFGH')
print('IJKL\nMNOP\nQRST')
#This is a comment
#Display or not?

OBSERVATION E: (Use the answer sheet)

CONCLUSION: (Use the answer sheet)

T-CPET121LA
Introduction to Computational Thinking

You might also like