Unit 6 - Python

Unit 6 - Lesson 11

67.1.1. Introduction to web scrapping (a) Using socket programming we can retrieve web pages by posting HTTP requests to the remote web serv…

Unit 6 - Lesson 10

66.1.1. An introduction of regular expression/String pattern matching (a) A regular expression, regex or regexp is a sequence of characters t…

Unit 6 - Lesson 9

65.1.1. Packages overview (a) Packages can be thought as directories with some specific rules. (c) Each package should have a file called __i…

Unit 6 - Lesson 8

64.1.1. Using 'from' keyword along with import from Module_Imp3 import calculatearea, calculatediameter # Write your code here a = …

Unit 6 - Lesson 7

63.1.1. Importing a module # using import statement, import CheckNegative import CheckNegative # take an interger as input from the user i =…

Unit 6 - Lesson 6

62.1.1. Raising an exception def checkage(age): if age < 0: raise ValueError("age should be greater than or equal to zero") …

Unit 6 - Lesson 5

61.1.1. Try with many except blocks (a) A try block can have more than one except block, each block handling a type of Exception. (b) Based o…

Unit 6 - Lesson 4

60.1.1. Syntax Error (a) A error is generally a bug in the program usually caused by the developer who develops the code. (b) There are gener…

Unit 6 - Lesson 3

59.1.1. Exception - An overview (a) Exception is an event which occurs to disrupt the flow of the given program. (b) Exception handling is a …

Unit 6 - Lesson 2

58.1.1. File Open statement (b) The mode argument tells how the file is to be opened, e.g. for reading only, for writing only etc. (d) If we …

Unit 6 - Lesson 1

57.1.1. Understanding File Name and File Path (b) File are stored on external media 57.1.2. Understanding File Name and File Path (d) Fi…