For example : Multiple strings : Strings storing multiple lines of text. #printing the values after swapping Example : if n>0: All you have to do is download the SelfStudys Class 11 NCERT Solution Computer Science Python once for FREE and you are able to go. Enter the time in years: 4 Question 3: Is Python Object-Oriented Language ? Which of the following variable names are invalid ? Getting Started with Python. Question 16: The above statement can be written as e) The float data type will be used to represent 'Volume of a sphere'. Name some commands of Python. Question 5: r1 = 7 The distance formula can be used to calculate the distance between the points where the dart hits the dartboard and the centre of the dartboard. tf = freeze * (9/5) + 32 It is a character constant and is containing just one character \”. Built using WordPress and the EmpowerWP Theme, Click to share on Twitter (Opens in new window), Click to share on Facebook (Opens in new window), NCERT Solutions for Class 11 Computer Science (Python) – Introduction to Python, NCERT Solutions for Class 11 Computer Science (Python) – Operators in Python.  # The expression within inner brackets will be evaluated first Question 1: #calculating the 100th year for the user considering 2020 as the current year Therefore, the degree will be converted to radians and then the sin() function will be applied. Single line strings : Strings that are terminated in single line. print(True or (not False and False)) b) The boolean data type will be used to represent 'Resident of Delhi or not' as a person will be either a resident of Delhi or not a resident of Delhi. Write a program to swap two numbers using a third variable. Answer: #printing the values before swapping Data Representation 4. Python Fundamentals. This is the second line. #defining two variables c) (6,6): True What will be the size of the following constants : “\a”. Therefore, the output will be 1.0. Yes, List is a standard data type. Program: d) Pocket money True Question 4: Introducing Python Modules. config.a = 1 #When floor division is used, return value will be int data type      g) num1 = 24 // 4 // 2 num1 = 4 ** (3 + 5) = 4 ** 5 = 1024 k) print(10 != 9 and 20 >= 20) Algorithms and Flowcharts Unit 3 : Introduction to Python. >mytuple[2] = 4 # Error – tuple can’t be modified. LHS : Enter the number of days required by C to complete work alone: 20 Then Simple Interest (SI) = (P x R x T)/ 100. Answer: Pylint is another tool that checks if a module satisfies a coding standard, and also makes it possible to write plug-ins to add a custom feature. i) num1 = int('3.14') “\” – size is 1. Operators in Python 10. print(True and True)   print(num1) No, Python does allow for either pairs of single or double quotes. All white space i.e. f) The float data type will be used to represent 'Perimeter of a square'. r3 = 16 Modifying an immutable variable will rebuild the same variable. Which data type in Phython are immutable. Python allow five types of literals : Question 3: Question 11: Question 7: a) length, breadth = 10,20 spaces and tabs are preserved as it is. Question 2: Answer: c) (1 < -1) == (3 > 4 ), Write the output of the following. a) num1 += num2 + num3 e) print(4.00/(2.0+2.0)) Answer: 34 != -1 #print the result Variables x and y store the x-coordinate and the y-coordinate of a dart that hits the dartboard. Question 12: Write any two Standard Data Types in Python. Get Full Course Thoery Notes @ Rs. Answer: LHS: Volume of sphere, V=43πr3 There is a list of tutorials suitable for experienced programmers on the BeginnersGuide/Tutorials page. >>> x= 5 Answer: print("When the radius is",r2,"cm, the volume of the sphere will be", round(volume2,2),"cc") What is used to represent Strings in Python ? volume3 = (4/3*22/7*r3**3) Click me to see the solution. x = 5 Get solutions to all chapters of Computer Science with Python by Sumita Arora book Class 11 CBSE & NCERT. g) The string data type will be used to represent 'Name of the student'. volume1 = (4/3*22/7*r1**3) Q 1 = Write instructions to get the following result: Math is Fun so don't be resistant. This is the first line. Strings in double quotes work exactly the same way as strings in single quotes. Adding fractions, get common denominators. Question 12: Answer: Computer Science in Class 11 is an important and easy to score subject for Class 11 … Go to the editor Click me to see the solution. 5 Functions 11. 10 + 6 * 2 ** 2 != 9//4 - 3 Python Pandas II - Dataframes and Other Operations. c) (6, 6) What is the extension of Python language? If a variable is assigned a new value anywhere within the function’s body, it’s assumed to be a local. Recent Posts ... Write a comment. Class 11 Computer Science (Python) NCERT Solutions for Class 11 Computer Science (Python) – Getting Started with Python Very Short Answer type Questions [1 mark each] #defining three variables Conditional and Iterative Statements. 12. OUTPUT:- If more than one word is used as a variable then it can be separated using underscore ( _ ), instead of space. What is a tuple ? Python Fundamentals. List and String. tb = boil * (9/5) + 32 Ans- Python was developed by Guido Van Rossum. (c) abc@123 : Special characters aren’t allowed in variable names. Question 6: (d) abc@123 #Input first number n) print((0 < 6) or (not (10 == 6) and (10<0))). #Program to calculate the equivalent energy of an object Though a bit surprising at first, a moment’s consideration explains this. Getting started with python || Type B || Sumita arora || Class 11 || Computer science || Information practices || Solution. Your email address will not be published. ‘one,two,three’, Question 10: Lists are the most versatile of Python’s compound data types. No reserved word or standard identifier should be used. Therefore, the output will be 'False'. print(True or (True and False)) This statement will make y refer to 5 of x. c) num1, num2 = 2, 3 Check out the latest CBSE NCERT Class 11 Computer Science Syllabus.The syllabus is for the academic year 2020-21 session. g) num1 = 24 // 4 // 2 cannot be changed. Data Handling. It can be operated on only. hundred = 2020 + (100 - age) Answer: Python Fundamentals. Interactive Mode Programming. Does Python allows you to assign a single value to several variables simultaneously ? #printing the values after swapping Data Transfer between Files, SQL Databases and Dataframes. foo = [x for x in range(l, 11) if (x % 2) = = 0] print foo [2,4,6,8,10]. a) Assign 10 to variable length and 20 to variable breadth. Yes. c) stationary =['Paper','Gel Pen','Eraser'] Write a Python program to find the volume of spheres with radius 7 cm, 12 cm, 16 cm, respectively. Answer: vi) total-Marks: Invalid - Identifier in Python cannot contain any special character except underscore(_). Dictonaries falls under mapping. Go to the editor Click me to see the solution On one hand, requiring global for assigned variables provides a bar against unintended side-effects. Python converts source code written by the programmer into intermediate language which is again translated into the native language/ machine language that is executed. A tuple consists of a number of values separated by commas. The diagram can be drawn as follows: Name four Python’s basic data types. The values of x and y after swapping are 6 and 5 respectively. Yes, Python allows you to assign a single value to several variables simultaneously. 4. NCERT Solutions for Class 11 Computer Science (Python) – Getting Started with Python, Very Short Answer type Questions [1 mark each]. Why are they called so ? a) The sum of 20 and –10 is less than 12. print(True and True) OUTPUT: String Manipulation. a) Number of months in a year Here 'n' is an integer entered by the user. The string will be repeated only if the value is greater than zero, otherwise, it will return a blank. RHS: Clear your computer doubts instantly & get more marks in computers exam easily. The error will arise only when 'interpreter' will run the line containing these statements. A tuple is another sequence data type that is similar to the list. When do you use list vs. tuple vs. dictionary vs. set? Program: Therefore, the output will be 1024. mass = float(input("Enter the mass of object(in grams): "))   print(num1) Answer: c ⇒ speed of light in m/s. For example : chess, _ch, etc. print('Water Boiling temperature in Fahrenheit::') The type of output will be a string, not an integer. However, if we have to store the address in a more structured format, we can use dictionary data type as well. Which data type will be used to represent the following data values and why? When the radius is 12 cm, the volume of the sphere will be 7241.14 cc You will turn 100 years old in the year", #Program to calculate the equivalent energy of an object, #Speed of light is known and given in the question, #calculating the energy, mass is divided by 1000 to convert it into kilogram, #import the math module, to use sin & radians function, # Calculating height and rounding it off to 2 decimal places, "The height reached by ladder with length", TS Grewal Solutions for Class 12 Commerce, TS Grewal Solutions for Class 11 Commerce, Homework Questions for Class 11 Humanities, Homework Questions for Class 12 Humanities, CBSE Class 10 Board Paper Solutions for Math, CBSE Class 10 Board Paper Solutions for Science, CBSE Class 10 Board Paper Solutions for Social Science, CBSE Class 10 Board Paper Solutions for English, CBSE Class 10 Board Paper Solutions for Hindi, CBSE Class 12 Science Board Paper Solutions for Math, CBSE Class 12 Science Board Paper Solutions for Physics, CBSE Class 12 Science Board Paper Solutions for Chemistry, CBSE Class 12 Science Board Paper Solutions for Biology, CBSE Class 12 Commerce Board Paper Solutions for Economics, CBSE Class 12 Commerce Board Paper Solutions for Accountancy, CBSE Class 12 Commerce Board Paper Solutions for Business Studies, CBSE Class 12 Commerce Board Paper Solutions for Math, CBSE Class 12 Humanities Board Paper Solutions for English. A, B, C take x days, y days and z days respectively to do the job alone. Using Double Quotes (”) #calculating the volume using the formula ⇒ height = length × sin(θ) e.g Rs.   num3, num2 = num1, num3 + 1 Introducing Python Modules. Sets are immutable.     print("Invalid value for n, enter only positive values") #if dis is greater than 10, means that dart is more than 10 units away from the centre. Algorithms and Flowcharts Unit 3 : Introduction to Python. c) 1 < -1 == 3 > 4, a) ( 0 == (1==2)) x num1 = 2 + 252/10            Answer: Get solutions to all chapters of Computer Science with Python by Sumita Arora book Class 11 CBSE & NCERT. b) (2 + (3 == 4) + 5) == 7 a = [‘one’, ‘two’, ‘three’] e) fullname = first +" "+ middle +" "+ last, Write logical expressions corresponding to the following statements in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, last are already having meaningful values): Therefore, the values True or False will be sufficient to represent the values. Python Pandas II - Dataframes and Other Operations. For example, Therefore, the output will be 27.2. We have given all the detailed NCERT Solutions for Class 11 Getting Started with Python in PDF format which you can read for FREE. m ⇒ mass in Kilogram, Write various python modules convert the list to generate the output “one, two, three” ? students are advised to check out the complete syllabus and exam pattern with the marking scheme.. config.b = 2 What factors guide the choice of identifiers in Programs ? import math   print (num1) Enter the rate of interest per annum: 4.5 Answer: OUTPUT: How do you make conversion between tuples and lists ? #When the operators are same, left to right order will be followed for operation c = 0 Important Python Loop Programs for Class 11 Practical File; if-elif-else python exercises Class11; Practical file questions for Python programming fundamentals; 8 simple python practical exercises for getting started with python for CBSE class 11; Practical File Questions Class 11 … Program: quotes. Python Pandas II - Dataframes and Other Operations. All you have to do is download the SelfStudys Class 11 NCERT Solution Computer Science Python once for FREE and you are able to go. The error will arise only when 'interpreter' will run this line. A tuple is immutable i.e. c) Assign a list containing strings ‘Paper’, ‘Gel Pen’, and ‘Eraser’ to a variable stationery. str = "GOOD MORNING " List Manipulation. a) 0 == 1 == 2 First, of all check the CBSE Class 11 Computer Science Exam Pattern. Data Handling. Dictionaries. Question 21: Class 11 | Practical Book | Chapter 1: Getting Started with Python - Solutions 159 Write a comment. Answer: Three types of sequence data type available in Phyton are strings, lists and tuples. d) Assign the strings ‘Mohandas’, ‘Karamchand’, and ‘Gandhi’ to variables first, middle and last. Question 8: Answer: All characters are significant. c) 24 feet and 45 degrees Getting started with Python 11th Computers CBSE NCERT Chapter 8 Marketing along with videos,solved papers and worksheets.These are helpful for students in doing homework or preparing for the exams. #printing the volume after using the round function to two decimal place for better readability Microprocessor and Memory Concepts Unit 2 : Programming Methodology. Water Freezing temperature in Fahrenheit:: arrow_back Getting started with Python. Master the concepts with our detailed explanations & solutions. num1 = 2 + 9 * 28/10 #defining the boiling and freezing temp in celcius, 'Water Boiling temperature in Fahrenheit::', #Calculating Boiling temperature in Fahrenheit, 'Water Freezing temperature in Fahrenheit::'. You will also love the ad-free experience on Meritnation’s NCERT Solutions. Dictionary consist of pairs’-of keys and their corresponding values. print("The height reached by ladder with length",length,"feet and aligned at",degrees,"degrees is",height, "feet.") Question 5: For example, list((1, 2, 3)) yields [1, 2, 3] and list (‘abc’) yields [‘a’, ‘b’, ‘c’j. Write the corresponding Python assignment statements: h)The string data type will be used to represent 'Address of the student'. Therefore, ‘if’ condition will be used to check the values of 'n' first and then the print statement will be executed. #formula used as per the question d) Enter the length of the ladder: 24 Answer: T = float(input('Enter the time in years: ')) Question 9: Answer: Your email address will not be published. #asking for the mass in grams 12. Program: Program: Conditional and Looping … This clutter would defeat the usefulness of the global declaration for identifying side-effect. print("Addition: ",num1+num2) The values of x and y are 5 and 6 respectively. Program: Introduction to Python 8. print("The values of x and y are",x,"and",y,"respectively.") OUTPUT: modulel.py: num1 = 2 + 9 * (36 - 8) /10  Interactive Mode Programming and Script Mode Programming. This will result in an error as we cannot pass string representation of float to an int function. #Printing the total amount     print(str * n) #Program to input two numbers and performing all arithmetic operations r2 = 12 students are advised to check out the complete syllabus.. CBSE Useful Resources. Answer: What would the following code yield ? Explain String data type. (adsbygoogle = window.adsbygoogle || []).push({}); ©  2020 indianexpresss.in. tuple initialization: a = (2,4,5) list initialization: a = [2,4,5], Question 9: # The expression within outer brackets will be evaluated next          Which data type consists of a number of values separated by commas ? #Asking the user for Principal, rate of interest and time #Calculating Boiling temperature in Fahrenheit x = int(input('Enter the number of days required by A to complete work alone: ')) a) 2, 5 All NCERT Solutions for class Class 11 Science Computer science are prepared by experts and are 100% accurate. Answer: Total time taken to complete work if A, B and C work together: 3.64. Which mode of Python invoking the interpreter with a script parameter begins execution of the script and continues until the script is finished ? This document is highly rated by Class 11 students and has been viewed 4163 times. Python Fundamentals. Getting Started with Python. (b) 123 Hello 5. What is IDLE? >>> ‘,’.join(a) What are the rules for local and global variables in Python? Subsets of strings can be taken using the slice operator ( [ ] and [ : ] ) with indexes starting at 0 in the beginning of the string and working their way from -1 at the end. #printing the total time taken by all three persons Answer: Which mode of Python invoking the interpreter without passing a script file as a parameter ? What is the difference between a keyword and an identifier ? Answer: Identifier is the user-defined name given to a part of a program like variable, object, functions etc. a) Enter the length of the ladder: 16 Introducing Python Modules. y Learning. Short Answer type Questions  [2 mark each]. Before we discussed the CBSE Class 11 Computer Science NCERT Solutions.Let us check the Class 11 Computer Science Syllabus. List Of Chapters. quotes freely within the triple quotes. String Manipulation. How many ways are there in Python to represent an integer literal ? where, E ⇒ energy measured in Joule, print("Results:-") What does ‘immutable’ mean ? View NCERT Solutions for all chapters of Class 11. x,y = y,x (b) 123 Hello : Variable names can’t start with a digit. How do you make an array in Python? Strings in Python are identified as a contiguous set of characters in between quotation marks. 10 + 24 != -1 Use a list: [“this”, 1, “is”, “an”, “array”] Lists are equivalent to C or Pascal arrays in their time complexity. The formula E = mc2 states that the equivalent energy (E) can be calculated as the mass (m) multiplied by the speed of light (c = about 3×108 m/s) squared. print(True or False) CBSE Class 11 – Python Conditional Statements – Simple If, If_elif_else, nested if Statement Posted on by tutorialaicsip Now you are familiar with how to use Operators , write expressions , accepting input and output statements in python. Question 15: Write a list comprehension that builds a list of the even numbers from 1 to 10 (inclusive). b) (10,10) Getting started with python || Type A || Sumita arora || Class 11 || Computer science || Information practices || Solution e) Assign the concatenated value of string variables first, middle and last to variable fullname. print("The average of",a,b,"and",c,"is",average) arrow_back Getting started with Python. Functions 11. y = k Enter the principal: 12500 String Manipulation. #defining three different radius using variables r1, r2, r3 Answer: And most important, you must be persistent! num1 = 4 ** 5 c) The integer data type will be used to represent 'Mobile number' as it will be a ten-digit integer only. Lists are mutable objects that can contain any Python data. print(True) Each type Python programs executed code is required. Answer: (c) List “What’s your name?,” I asked. Conditional and Iterative Statements. Answer: Yes, Python is a high-level Language. # age converted to integer for further calculation print word[:3] + word[3:]. Answer: Interactive Mode Programming and Script Mode Programming. Python Fundamentals. Write a comment. j) print('Bye' == 'BYE') A list contains items separated by commas and enclosed within square brackets ([ ]). a) 16 feet and 75 degrees Answer: The function tuple (seq) converts any sequence (actually, any.iterable) into a tuple with the same items in the same order. What is PEP 8? Question 2: Write a Python class named Circle constructed by a radius and two methods which will compute the area and the perimeter of a circle. If the argument is a list, if makes a copy just like se[:j would. (a) Numbers >>> y = x Division:  2.6666666666666665 Using Triple Quotes o(”’ or ” ” “) Introducing Python Modules. Answer: Question 20: The values of x and y are 5 and 6 respectively. Note:- If the side length is a whole number, the perimeter will always be an integer, however, we should be open to the possibility that the side length can be in decimal as well. Energy = (mass/1000) * c ** 2 e) Volume of a sphere Keywords are reserved and are few. config.c = 3 Therefore, the output will be 'True'. Question 13: Identifiers are not reserverd. set of instructions) that control the behavior of a machine and/or to express algorithms precisely. When the radius is 7 cm, the volume of the sphere will be 1437.33 cc Program: Python Programming Fundamentals for Class 11 and 12 – Introduction A programming language is an artificial language designed to communicate instructions to a machine, usually computer. April 13, 2019 Share Get link; Facebook; Twitter; ‘\a’ – size is 1 as there is one character and it is a string literal enclosed in single quotes. a = 5 Python’s built-in data type is dictionary, which defines one-to-one relationships between keys and values. Enter the mass of object(in grams): 25 Addition:  11 Computer Science in Class 11 is an important and easy to score subject for Class 11 … y = 6 Answer: Question 7: #Printing the result for all arithmetic operations Class 11 Computer Science (Python) NCERT Solutions for Class 11 Computer Science (Python) – Getting Started with Python Very Short Answer type Questions [1 mark each] The values need to be passed in radians to the sin() function. print(tb) num1 = 27.2 Write the kind of Python’s dictionary ? Even if 'r' is a whole number, the value of volume can be a fraction which can be represented in a decimal form easily by float data type. Print a message addressed to the user that tells the user the year in which they will turn 100 years old. Conditional and Looping Constructs “Dictionary” is similar to what their name is. Ltd. The ‘None’ literal is used to indicate something that has not yet been created. Python allows for either pairs of single or double quotes. below we have mentioned complete Class 11 Computer Science Syllabus. #Converting degrees to radian What is “None” literal in Python ? These solutions for Getting Started With Python are extremely popular among Class 11 Science students for Computer science Getting Started With Python Solutions come handy for quickly completing your homework and preparing for exams. Program: CLASS 11; 2. Conditional Operators. Question 11: The syntax is correct. 15 < 50 (Hint: T(°F) = T(°C) × 9/5 + 32), Program: #printing the 100th year freeze = 0 Modulus:  2 1. print("When the radius is",r1,"cm, the volume of the sphere will be", round(volume1,2),"cc") a) Runtime Error. If the side length is a decimal number, the result may come out to be a decimal number which can be easily represented by float data type. The above statement will be executed as per the following steps. iii) Hundred$:  Invalid - Identifier in Python cannot contain any special character except underscore(_). The height reached by the ladder with length 16 feet aligned at 75  degrees is 15.45 feet. Therefore, the output will be 'True'. The e-book PDF of Python is available for free download. String. CBSE Revision Notes Class 11 Computer Science Python note for class 11 Mathematics, Physics, Chemistry, Computer Science and other subject are very helpful to revise the whole syllabus during exam days. Water Boiling temperature  in Fahrenheit:: #Asking the user for Principal, rate of interest and time, #caculating amount = Simple Interest + Principal, #Asking for the number of days taken by A, B, C to complete the work alone, 'Enter the number of days required by A to complete work alone: ', 'Enter the number of days required by B to complete work alone: ', 'Enter the number of days required by C to complete work alone: ', #calculating the time if all three person work together, #rounding the answer to 2 decimal places for easy readability, #printing the total time taken by all three persons, 'Total time taken to complete work if A, B and C work together: ', Enter the number of days required by A to complete work alone: 8, #Program to input two numbers and performing all arithmetic operations, #Printing the result for all arithmetic operations, # k is the third variable used to swap values between x and y, "The values of x and y after swapping are". Exponentiation:  512. (d) Tuple Introducing Python Pandas. b) 20 feet and 0 degrees Python allows two string types : Question 5: As x being, immutable type, has been rebuild. Now, the complete equation can be written as     print (num1) Question 2: Write any two Standard Data Types in Python. Answer: NCERT Solutions Class 11 Computer Science Getting Started with Python. Justify. Getting Starting With Python. iv) Total Marks: Invalid - Identifier in Python cannot contain any special character except underscore(_). 250.50 i.e 250 rupees and 50 paise. # Using 'multiple assignment' to swap the values Example : m) print(5 % 10 + 10 < 50 and 29 <= 29) Class 11 XI Python and Computer Fundamental NCERT TEXTBOOK, SOLUTIONS in PDF and PPT. If the argument if a tuple, it does not make a copy but returns the same object, so it is cheap to call tuple( ) when you aren’t sure that an object is already a tuple. Write a Python program to compute the height reached by the ladder on the wall for the following values of length and angle: He said “syed saif naqvi.”. will create a value 5 referenced by #calculating simple interest Question 7: Address = { 'Line1': ‘Address line 1', 'Line2':'Address Line2', 'Locality':'Locality Name', 'City':'City Name', 'Pincode':110001, 'Country':'India'}, Give the output of the following when num1 = 4, num2 = 3, num3 = 2 Therefore, the first line is just a string concatenation which will give the output 55. #Asking for the number of days taken by A, B, C to complete the work alone b) 2 + 3 == 4 + 5 == 7 CLASS XI PYTHON COMPUTER SCIENCE. Ans- Python was released in February 1991. Solutions for Class 11 Computers c) num1 **= num2 + num3 import config Answer: Subtraction:  5 Question 11: Number data type stores numerical values and is immutable i.e., value of its object cannot be changed. Do Python variables have to be explicitly declared to reserve memory space ? OUTPUT: If more than one word is used as a variable then it can be separated using underscore ( _ ), instead of a hyphen ( - ). R = float(input('Enter the rate of interest per annum: ')) FREE Downloadable NCERT Solutions.Works without internet, Address = { 'Line1': ‘Address line 1', 'Line2':'Address Line2', 'Locality':'Locality Name', 'City':'City Name', 'Pincode':110001, 'Country':'India'}, print(10 + 6 * 2 ** 2 != 9//4 -3 and 29>= 29/9), print((0 < 6) or (not (10 == 6) and (10<0))), print( (0 < 6) or (not (10 == 6) and (10<0) ) ). n = int(input("Enter the value of n: ")) dis = (x ** 2 + y ** 2) ** 0.5 Floor Division:  2 Give an example. The four basic data types are : Question 12: e.g. Question 4: num1 **= 5 OUTPUT:- You have to declare as global every reference to a builtin function or to a component of an imported module. The syntax for the division is correct. Getting Started with Python 9. These are defined by the user but they can have letters, digits and a symbols underscore. Programming Methodology 6. c) Mobile number >my list = [1,1.0+3j, “aperitivo”, true] # make a list containing four entities. num1 = num1 + 3 + 2 = 4 + 3 + 2 = 9
2020 getting started with python class 11 solutions