Python Introduction

Python Introduction


Python is a general purpose programming language created by Guido Van Rossum from CWI (Centrum Wiskunde & Informatica) which is a National Research Institute for Mathematics and Computer Science in Netherlands. Th e language was released in I991. Python got its name from a BBC comedy series from seventies- “Monty Python’s Flying Circus”. Python supports both Procedural and Object Oriented programming approaches.

Key features of Python

  • It is a general purpose programming language which can be used for both scientifi c and non-scientifi c programming.
  • It is a platform independent programming language.
  • Th e programs written in Python are easily readable and understandable.

The version 3.x of Python IDLE (Integrated Development Learning Environment) is used to develop and run Python code. It can be downloaded from the web resource www.python.org.

Programming in Python

In Python, programs can be written in two ways namely Interactive mode and Script mode. The Interactive mode allows us to write codes in Python command prompt (>>>) whereas in script mode programs can be written and stored as separate file with the extension .py and executed. Script mode is used to create and edit python source file.

Qus. 1 : Is Python case sensitive when dealing with identifiers?

  1. yes
  2. no
  3. machine dependent
  4. none of the mentioned
Qus. 2 : Python uses a/an _______ to convert source code

  1. Interpreter
  2. Compiler
  3. Combination of Compiler and Interpreter
  4. all of these
Qus. 3 : Python code can run on a variety of platforms, it means Python is a _____ language.

  1. Graphical
  2. Cross-Platform
  3. Platform Dependent
  4. All of these
Qus. 4 : You do not have pay Python and you can view its source code too. it means Python is _______

  1. Free and Open Source
  2. Freeware
  3. Open source
  4. Shareware
Qus. 5 : Python is ________ Programming Language

  1. High Level
  2. Object Oriented
  3. Low Level
  4. Both A and B
Qus. 6 : Which of the following is not a valid identifier?

  1. student
  2. s12
  3. 123
  4. _123
Qus. 7 : Which of the following variable declaration is incorrect?

  1. a_=3
  2. _a=3
  3. a?=3
  4. All of these
Qus. 8 : In which language is Python written?

  1. English
  2. PHP
  3. C
  4. All of the above
Qus. 9 : In which year was the Python language developed?

  1. 1995
  2. 1972
  3. 1981
  4. 1991
Qus. 10 : Which of the following is incorrect regarding variables in Python?

  1. Variable names in Python cannot start with number. However, it can contain number in any other position of variable name.
  2. Variable names can start with an underscore.
  3. Data type of variable names should not be declared.
  4. None of the above.
Qus. 11 : The tiny individual unit in python program is known as

  1. Keywords
  2. Identifires
  3. Token
  4. Statement
Qus. 12 : What is can be the length of python identifier

  1. 100
  2. 128
  3. 256
  4. No Limit
Qus. 13 : In what language is the Python programming language written?

  1. C
  2. C++
  3. JAVA
  4. PHP
Qus. 14 : Which one of the following is the correct extension of the Python file?

  1. .python
  2. .py
  3. .p
  4. .pyt
Qus. 15 : To start Python from the command prompt, use the command

  1. execute python
  2. go python
  3. python
  4. run python
Qus. 16 : How is a code block indicated in Python?

  1. Brackets
  2. Indentation
  3. Key
  4. None of the above
Qus. 17 : PVM is often called

  1. Python Interpreter.
  2. Python compiler
  3. Python Volatile machine
  4. Portable virtual machine

Programs

python program to input a welcome message and print it

View Solution


python program to print number of seconds in year

View Solution


Python program to calculate GST Goods and Service Tax

View Solution


python program to find the ASCII Value of entered character

View Solution


python program that display a joke but display the punch line only when the user presses enter key

View Solution


python program to generate the following output 5 10 9

View Solution


python program to print 5@10@9

View Solution


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad