Header Ads Widget

Responsive Advertisement

Python Programming Week 1 Quiz Solution [Python Programming course on Prutor.ai by IIT kharagpur]

Here you will get all the assignment and quiz solutions of Python Programming Course by prutor.ai. Prutor is an online smart tutoring platform which provides various MOOC courses for student and organised by by IIT Kharagpur. At the end of each course student gets a certificate for sucessfull  completion of each course but throughout the course students have to pass all the weekly assignments and quizes.



[1]  What is the first step in write a program?

  • (a): Run Code
  • (b): Write Code
  • (c): Edit Code
  • (d): Check the Code

Answer:(b) Write Code

[2] Logical solution is a ____and clear _____procedure to solve the problem, known as _____.

  • (a): problem description, step-by-step, flowchart
  • (b): expression, assignment statement, identifier
  • (c): finite, step-by-step, Algorithm
  • (d): finite, assignment statement, algorithm

Answer: (c) finite, step-by-step, Algorithm

[3] Python is a/an___________ language (unlike C, C++, Java).

  • (a): Logical programming
  • (b): Interpreted programming
  • (c): Compiled programming
  • (d): Complex programming

Answer:(b) Interpreted programming

[4] What is the extension of a python file?

  • (a): .py
  • (b): .pyt
  • (c): .py
  • (d): ptn




Answer: (c) .py

[5] Which statement is correct?

  • (a): print(hello world)
  • (b): print “hello world!”
  • (c): printf(“hello world!”)
  • (d): print(“hello world”)

Answer: (d) print(“hello world”)

[6] In Python variables can be thought of as ______.

  • (a): labels
  • (b): containers
  • (c): boxes
  • (d): tumblers’

Answer:(a) labels

[7] Which function is used to get a string in Title Cases (First letter of each word in capital)?

  • (a): pint()
  • (b): title()
  • (c): strip()
  • (d): lstrip()

Answer: (b) title()

[8] Which function is used to get rid of the blank spaces on the left?

  • (a): strip()
  • (b): left()
  • (c): rstrip()
  • (d): lstrip()




Answer: (d) lstrip()


[9]A Python Program is a sequence of ___ and ___.

  • (a): data and information
  • (b): classes and objects
  • (c): strings and arrays
  • (d): definitions and commands

Answer: (d) definitions and commands

[10]What will be the output of : type(3.5) ?

  • (a): class double
  • (b): class str
  • (c): class int
  • (d): class ‘float’

Answer:(d) class ‘float’

[11] What will be the output of : int(2.5) ?

  • (a): 1
  • (b): 3
  • (c): 2
  • (d): 2.5

Answer:(c) 2


 

[12] Any input that you take in Python is of ___ data type.

  • (a): str
  • (b): int
  • (c): float
  • (d): char




Answer:(a) str

[13] What is the output of the following : 4//5 ?

  • (a): 1
  • (b): .8
  • (c): 0
  • (d):8

Answer:(c) 0

[14] What will be the value stored in y? : x, y, z = 1, 2, 3

  • (a): 1
  • (b): 2
  • (c): 3
  • (d): None of these

Answer: (b) 2

[15] Which of the following is a valid identifier or variable?

  • (a): well&1
  • (b): well 1
  • (c): well_1
  • (d): @well

Answer: (c) well_1


If you have any quetions, please comment down below, we will try to answer with in first 24 hour. Hope you liked this content, We will come with another week’s quiz, Thanks for reading. Good Bye.

Post a Comment

0 Comments