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 : 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. 2 : Which of the following is not a valid identifier?

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

  1. a_=3
  2. _a=3
  3. a?=3
  4. All of these
Qus. 4 : In which year was the Python language developed?

  1. 1995
  2. 1972
  3. 1981
  4. 1991
Qus. 5 : 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. 6 : The tiny individual unit in python program is known as

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

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

  1. C
  2. C++
  3. JAVA
  4. PHP

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


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad