Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

print("This is a simple Python program")

print("*")
print("***")
print("****")
print("*****")

#Exercises

#1 What is a compiler
''' A compiler is translates a source file in a executable'''
#2 What is an interpreter
''' An interpreter translates a source file into an executable file. The executable
file may be run
at any time with no further translation needed'''
#3 How is a compiler similar to an interpreter ? How they are different
'''
An interpreter translates a source file into machine language where a compiler
translates a source
into an executable. An interpreter is similar to a compiler in the sense that the
source file
itself is the executable but it must be interpreted each time the user executes it
'''
#4. How is compiled or interpreted code different from source code?
'''
Compiled code is different from interpreted code in the sense that interpreted code
ia slower than compiled
code
'''
#5. What tool does a programmer use to produce Python source code?
'''
The tool used by the programmer to produce Python source code is either a text
editor or an
integreted developing environment
'''
#6. What is necessary to execute a Python program?
'''
In order to execute a Python program it is necessary to have interpreter
'''
#7 List several advantages developing software in a higher-level language has over
developing software in machine language
'''
It is human readable, it can be learned easy, does not depend on hardware, presence
of reuse
'''
#8. How can an IDE improve a programmers productivity?
'''
Because it includes all the tools necessary to develop software
'''
#9 What the official Python IDE?
'''
IDLE
'''
#10 What is a statement in a Python program
'''
A command that the interpreter executes
'''

You might also like