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

Moving From Blocks to Text L2-Difference Between Scriptmode and Interactive Modenotes

The document provides an overview of programming languages and the differences between Python's interactive and script modes. It includes definitions, activities for matching terms, and comparisons of the two modes, highlighting their uses, advantages, and disadvantages. The content is aimed at Grade 6 students learning to use Python IDLE.

Uploaded by

minahnna2023
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Moving From Blocks to Text L2-Difference Between Scriptmode and Interactive Modenotes

The document provides an overview of programming languages and the differences between Python's interactive and script modes. It includes definitions, activities for matching terms, and comparisons of the two modes, highlighting their uses, advantages, and disadvantages. The content is aimed at Grade 6 students learning to use Python IDLE.

Uploaded by

minahnna2023
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

7.

1-BLOCK IT OUT:
MOVING FROM BLOCKS TO TEXT
GRADE 6
TOPIC:USING PYTHON IDLE IN SCRIPTMODE
AND INTERACTIVE MODE
EXPLORE AND EVALUATE
Task : Match and Define Activity : Place each item from the list below into one of two categories:
LIST :

•Python
•Java
•YouTube
•Microsoft Word
•C++
•Calculator

Programming Languages Non-Programming


Languages
What is a programming language?

instructions Program

Programming languages

Programmer/developer
NOTES

A computer program is a set of instructions in programming


language that performs a specific task when executed by a
PROGRAM computer.

MS Word, MS Excel, Adobe Photoshop, Internet Explorer

Person who writes software or programs for computers is


PROGRAMMER called a programmer

The languages that are used to write a program or set of


PROGRAMMING instructions are called "Programming languages
LANGUAGE
C++,Java, Python
AFL: Choose the correct term from the given options :
(a) program (b) programmer (c) programming language

1. A ______ is a specialized language used to communicate instructions to a computer and allow it to perform tasks.

2. Python is an example of a ______, which provides a structured way for users to give commands to a computer.

3. A ______ consists of a set of instructions created using a programming language to perform specific tasks on a
computer.

4. A person who writes, tests, and debugs code using a programming language is called a ______.

5. The purpose of a ______ is to enable humans to give instructions to computers, creating everything from websites to
games.

6. Languages like Java, C++, and Python are all examples of a ______.

7. A ______ develops applications, games, and software by writing code that computers can understand and execute.
Answers:

1.programming language

2.programming language

3.Program

4.Programmer

5.programming language

6.programming language

7.programmer
WORKING IN PYTHON
INTERACTIVE MODE
SCRIPT MODE
INTERACTIVE MODE IS WHERE YOU TYPE
ONE-LINE COMMANDS AND THEY ARE SCRIPT MODE IS WHERE YOU PUT A
IMMEDIATELY EXECUTED. BUNCH OF COMMANDS INTO A FILE AND
Python shell THEN TELL PYTHON TO RUN THE FILE.
window

Entry prompt

File  New

ShortcutCtrl+N
• LO :Able to define programming language.
• Able to differentiate two working modes in python.
DIFFERENCE NOTES
Interactive mode Script mode
User can type in commands and see the results User can type a bunch of commands into a file ,
straight away and then tell Python to run the file

The interactive mode is more suitable for one-time Script mode is more suitable when there is a need
tasks. to automate tasks or when the same task needs to
be carried out several times.

Interactive mode can be edited in the same Script mode is usually edited in a text editor and
window then run as a batch process.

Interactive mode produces output that is displayed Script mode produces output that can be saved
on the screen and then disappears. and reused.

Interactive mode cannot be saved. Script mode can be saved in a text file.

Interactive mode is used to execute line by line Script mode is used to execute a block of code
expression
Activity 1: Find the missing words from the options given below

11
Activity 2 :Compare and fill in the comparison chart

12
Aspect Interactive Mode Script Mode
Interactive mode allows users Script mode allows users to
to type and run Python write multiple lines of code in
Definition
commands one by one in the a file and run them all at
Python shell. once.

Simple Example In Next slide In Next slide

Complex Example In Next slide In Next slide

- Easy to test small code - Useful for writing long


snippets. programs.
Advantages - Gives instant results. - Code can be saved and
- Good for beginners to reused.
experiment. - Better for structured coding.
- Not ideal for writing long 13
- Requires saving the file
programs.
before running.
Disadvantages - Code is lost when the
- Slower for testing small
Simple Example
Interactive mode

Script mode

14
Complex Example
Interactive mode

Script mode

15
Activity 3: Using the following Python code analyze them for both Interactive Mode and Script Mode.

You might also like