This document contains an assignment for a Python programming course covering conditional statements and loops. The assignment contains 5 questions: 1) mentioning benefits of Python and why it is interpreted, 2) short notes on programming cycle, elements, type conversion, operator precedence, and Boolean expressions, 3) differentiating between tuples/lists, // and /, id and type, is and in, && and ^, << and >> with examples, 4) identifying which of 3 statements produce errors and why, and 5) explaining Python data types with examples. The assignment is for third semester students in electronics, mechanical or civil engineering studying the Python programming language.
This document contains an assignment for a Python programming course covering conditional statements and loops. The assignment contains 5 questions: 1) mentioning benefits of Python and why it is interpreted, 2) short notes on programming cycle, elements, type conversion, operator precedence, and Boolean expressions, 3) differentiating between tuples/lists, // and /, id and type, is and in, && and ^, << and >> with examples, 4) identifying which of 3 statements produce errors and why, and 5) explaining Python data types with examples. The assignment is for third semester students in electronics, mechanical or civil engineering studying the Python programming language.
This document contains an assignment for a Python programming course covering conditional statements and loops. The assignment contains 5 questions: 1) mentioning benefits of Python and why it is interpreted, 2) short notes on programming cycle, elements, type conversion, operator precedence, and Boolean expressions, 3) differentiating between tuples/lists, // and /, id and type, is and in, && and ^, << and >> with examples, 4) identifying which of 3 statements produce errors and why, and 5) explaining Python data types with examples. The assignment is for third semester students in electronics, mechanical or civil engineering studying the Python programming language.
Python Programming (KNC -302) Assignment 1- Unit I AY 2022-23
CO1: Develop python programs with conditional and loops
1. Mention five benefits of Python programming language. Why is Python
called as Interpreted language? BL2 2. Write short notes on the following with suitable example: BL1 a. The Programming Cycle for Python b. Elements of Python c. Type Conversion in Python d. Operator Precedence & associativity e. Boolean Expression 3. Differentiate between the following(with suitable example): BL2 a. Tuple and Lists b. // and / c. id and type d. is and in e. && and ^ f. << and >> 4. Which of the following statements produce an error in Python and why? BL2 x, y, z = 1,2,3 # s1 a, b = 4,5,6 # s2 u = 7, 8, 9 # s3 5. Explain in short all data types used in python with a suitable example. BL1