Advertisements
Chapters
![NCERT solutions for Computer Science [English] Class 11 chapter 5 - Getting Started with Python NCERT solutions for Computer Science [English] Class 11 chapter 5 - Getting Started with Python - Shaalaa.com](/images/computer-science-english-class-11_6:f845d20929ea4abdb3a8e0cf9f430d7f.jpg)
Advertisements
Solutions for Chapter 5: Getting Started with Python
Below listed, you can find solutions for Chapter 5 of CBSE NCERT for Computer Science [English] Class 11.
NCERT solutions for Computer Science [English] Class 11 5 Getting Started with Python Exercise [Pages 115 - 119]
Which of the following identifier name are invalid and why?
Serial_no
Valid
Invalid
Which of the following identifier name are invalid and why?
1st_Room
Valid
Invalid
Which of the following identifier name are invalid and why?
Hundred$
Invalid
Valid
Which of the following identifier name are invalid and why?
Total Marks
Invalid
Valid
Which of the following identifier name are invalid and why?
Total_Marks
Invalid
Valid
Which of the following identifier name are invalid and why?
total-Marks
Invalid
Valid
Which of the following identifier name are invalid and why?
_Percentage
Invalid
Valid
Which of the following identifier name are invalid and why?
True
Invalid
Valid
Write the corresponding Python assignment statement:
Assign 10 to variable length and 20 to variable breadth.
Write the corresponding Python assignment statement:
Assign the average of values of the variable's length and breadth to a variable sum.
Write the corresponding Python assignment statement:
Assign a list containing strings ‘Paper’, ‘Gel Pen’, and ‘Eraser’ to variable stationery.
Write the corresponding Python assignment statement:
Assign the strings ‘Mohandas’, ‘Karamchand’, and ‘Gandhi’ to variables first, middle and last.
Write the corresponding Python assignment statement:
Assign the concatenated value of string variables first, middle, and last to variable fullname. Make sure to incorporate blank spaces appropriately between different parts of names.
Write a logical expression corresponding to the following statement in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, and last are already having meaningful values):
The sum of 20 and –10 is less than 12.
Write a logical expression corresponding to the following statement in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, and last are already having meaningful values):
num3 is not more than 24.
Write a logical expression corresponding to the following statement in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, and last are already having meaningful values):
6.75 is between the values of integers num1 and num2.
Write a logical expression corresponding to the following statement in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, and last are already having meaningful values):
The string ‘middle’ is larger than the string ‘first’ and smaller than the string ‘last’.
Write a logical expression corresponding to the following statement in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, and last are already having meaningful values):
List Stationery is empty.
Add a pair of parentheses to the expression so that it evaluates to True.
0 == 1 == 2
Add a pair of parentheses to the expression so that it evaluates to True.
2 + 3 == 4 + 5 == 7
Add a pair of parentheses to the expression so that it evaluates to True.
1 < -1 == 3 > 4
Write the output of the following:
num1 = 4
num2 = num1 + 1
num1 = 2
print (num1, num2)
Write the output of the following:
num1, num2 = 2, 6
num1, num2 = num2, num1 + 2
print (num1, num2)
Write the output of the following:
num1, num2 = 2, 3
num3, num2 = num1, num3 + 1
print (num1, num2, num3)
Which data type will be used to represent the following data values and why?
Number of months in a year
Which data type will be used to represent the following data values and why?
A resident of Delhi or not
Which data type will be used to represent the following data values and why?
Mobile number
Which data type will be used to represent the following data values and why?
Pocket money
Which data type will be used to represent the following data values and why?
Volume of a sphere
Which data type will be used to represent the following data values and why?
Perimeter of a square
Which data type will be used to represent the following data values and why?
Name of the student
Which data type will be used to represent the following data values and why?
Address of the student
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 += num2 + num3
print (num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = num1 ** (num2 + num3)
print (num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 **= num2 + num3
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = '5' + '5'
print(num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(4.00 / (2.0 + 2.0))
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = 2 + 9 * ((3 * 12) - 8)/10
print(num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = 24 // 4 // 2
print(num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = float(10)
print (num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = int('3.14')
print (num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print('Bye' == 'BYE')
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(10 != 9 and 20 >= 20)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(10 + 6 * 2 ** 2 != 9 // 4 - 3 and 29 >= 29/9)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(5 % 10 + 10 < 50 and 29 <= 29)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print((0 < 6) or (not(10 == 6) and (10 < 0)))
Categorize the following as syntax error, logical error, or runtime error:
25 / 0
Syntax error
Logical error
Runtime error
Categorize the following as syntax error, logical error, or runtime error:
num1 = 25; num2 = 0; num1/num2
Syntax error
Logical error
Runtime error
A dartboard of radius 10 units and the wall it is hanging on is represented using a two-dimensional coordinate system, with the board’s center at coordinate (0, 0). Variables x and y store the x-coordinate and the y-coordinate of a dart that hits the dartboard. Write a Python expression using variables x and y that evaluates to True if the dart hits (is within) the dartboard, and then evaluate the expression for these dart coordinates:
- (0, 0)
- (10, 10)
- (6, 6)
- (7, 8)
Write a Python program to convert temperature in degrees Celsius to degrees Fahrenheit. If the water boils at 100 degrees C and freezes at 0 degrees C, use the program to find out what is the boiling point and freezing point of water on the Fahrenheit scale. (Hint: T(°F) = T(°C) × 9/5 + 32)
Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate of interest = R% per annum and Time = T years. Then Simple Interest (SI) = (P × R × T)/100.
Amount payable = Principal + SI.
P, R, and T are given as input to the program.
Write a program to calculate how many days of work will be completed by three people A, B, and C together. A, B, and C take x days, y days, and z days respectively to do the job alone. The formula to calculate the number of days if they work together is xyz/(xy + yz + xz) days where x, y, and z are given as input to the program.
Write a program to enter two integers and perform all arithmetic operations on them.
Write a program to swap two numbers using a third variable.
Write a program to swap two numbers without using a third variable.
Write a program to repeat the string ‘‘GOOD MORNING” n times. Here ‘n’ is an integer entered by the user.
Write a program to find the average of three numbers.
The volume of a sphere with radius r is `4/3πr^3`. Write a Python program to find the volume of spheres with radii 7cm, 12cm, and 16cm, respectively.
Write a program that asks the user to enter their name and age. Print a message addressed to the user that tells the user the year in which they will turn 100 years old.
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. Write a program that accepts the mass of an object and determines its energy.
Presume that a ladder is put upright against a wall. Let variables length and angle store the length of the ladder and the angle that it forms with the ground as it leans against the wall. Write a Python program to compute the height reached by the ladder on the wall for the following values of length and angle:
- 16 feet and 75 degrees
- 20 feet and 0 degrees
- 24 feet and 45 degrees
- 24 feet and 80 degrees
CASE STUDY-BASED QUESTION
Schools use the “Student Management Information System” (SMIS) to manage student-related data. This system provides facilities for:
- recording and maintaining the personal details of students.
- maintaining marks scored in assessments and computing results of students.
- keeping track of student attendance.
- managing many other student-related data. Let us automate this process step by step.
Identify the personal details of students from your school identity card and write a program to accept these details for all students of your school and display them in the following format.
Name of School Student Name: PQR Roll No: 99 |
Solutions for 5: Getting Started with Python
![NCERT solutions for Computer Science [English] Class 11 chapter 5 - Getting Started with Python NCERT solutions for Computer Science [English] Class 11 chapter 5 - Getting Started with Python - Shaalaa.com](/images/computer-science-english-class-11_6:f845d20929ea4abdb3a8e0cf9f430d7f.jpg)
NCERT solutions for Computer Science [English] Class 11 chapter 5 - Getting Started with Python
Shaalaa.com has the CBSE Mathematics Computer Science [English] Class 11 CBSE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. NCERT solutions for Mathematics Computer Science [English] Class 11 CBSE 5 (Getting Started with Python) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.
Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. NCERT textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.
Concepts covered in Computer Science [English] Class 11 chapter 5 Getting Started with Python are Introduction to Python, Key Features of Python, Working with Python, Execution Modes, Python Keywords, Identifiers, Variables, Comments, Everything is an Object, Python Data Types, Number, Sequence, Set, None, Mapping, Classification of Data Types, Deciding Usage of Python Data Types, Operators in Python, Operators - Arithmetic Operators (-,+,*,/,%), Relational Operator (>,>=,<=,=,!=), Assignment Operators, Logical Operators (!,&&,||), Identity Operators, Membership Operators, Statement, Input and Output, Expressions, Type Conversion, Explicit Conversion, Implicit Conversion, Debugging.
Using NCERT Computer Science [English] Class 11 solutions Getting Started with Python exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in NCERT Solutions are essential questions that can be asked in the final exam. Maximum CBSE Computer Science [English] Class 11 students prefer NCERT Textbook Solutions to score more in exams.
Get the free view of Chapter 5, Getting Started with Python Computer Science [English] Class 11 additional questions for Mathematics Computer Science [English] Class 11 CBSE, and you can use Shaalaa.com to keep it handy for your exam preparation.