Python 1

You might also like

Download as pdf
Download as pdf
You are on page 1of 2
same. “vows quotation marks must be the (Jreck Point — .. Python programs are typed in : (@ Interactive mode (@ Script mode ce (¢ Acombination of interactive and seri (@ All of these jE modes > The ____ mode of Python gives instant (@ Interactive mode, ‘esult of typed statement @ Script mode (© Combination of interactive and script modes (@ All of these 3, To print the value of a variable, Python uses : (@) Print statement (© Print() function (©) print statement @ print( ) function 4. Python's two working modes are : mode and mode. injuactive. amd Stupe 3, The shortcut key to run a Python program from script mode is__ > 6. Python programs/scripts are stored in files with *Py extension. 7. You can create programs in Python's interactive mode. (1/F) [= & You can create programs in Python's script mode.(7/F) ( LET Us REVISE © Python was developed by % In Python, one can work in two % Interactive mode does not save com between commands. {Script mode is useful for creating Prograns “Python is a case sensitive programming language. Guido Van Rossum in February 1991. different ways: (i) Interactive mode, (ii) Seript mode. mands in the form of a program and also, output is sandwiched ‘and then run the programs later and get complete output. Selution Time — 1. Who developed Python Programm Ans. Guido Van Rossum in ning Language ? 1990s developed Python programming language. \ 216 ARTIFICIAL INTELLIGENCE-1x 2. What is the difference between interactive mode and script mode in Python ? Ans. In interactive mode, instructions are given in front of Python prompt (¢.g., >>> oF Int I: prompt, in Python Shell, Python carries out the given instruction and shows the result there itself. In script mode, Python instructions are stored ina file generally with .py extension and are executed together in one go as a unit, The saved instructions are known as Python script or Python program 3. Which of the following are not valid strings in Python % (a) “Hello” (b) ‘Hello’ (c) “Hello” (@) Hello” —_(e) {Hello} Ans. Strings (c), (d) and (e) are not valid strings in Python. < GLOSSARY Python Shell \nteractive interpreter of Python Source Code Complete program instructions peeMeciznrnont

You might also like