Getting Started with Python

Class 11 · Computer Science · 22 Questions

4intermediate🔧 Apply1 markShort Answer

Add a pair of parentheses to each expression so that it evaluates to True.

6beginner💡 Understand2 marksShort Answer

Which data type will be used to represent the following data values and why?

8beginner💡 Understand1 markVery Short

Categorise the following as syntax error, logical error or runtime error:

11intermediate🔧 Apply4 marksLong Answer

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 x R x T)/100. Amount payable = Principal + SI. P, R and T are given as input to the program.

12intermediate🔧 Apply4 marksLong Answer

Write a program to calculate in how many days a work will be completed by three persons A, B and C together. A, B, 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.

20intermediate🔧 Apply4 marksLong Answer

The formula E = mc2mc^{2} states that the equivalent energy (E) can be calculated as the mass (m) multiplied by the speed of light (c = about 3×3 \times 10^{8}$$ m/s) squared. Write a program that accepts the mass of an object and determines its energy.

22intermediate Create5 marksCase Study

Schools use “Student Management Information System” (SMIS) to manage student-related data. This system provides facilities for: • recording and maintaining 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 Class: XI Section: A Address: Address Line 1 Address Line 2 City: ABC Pin Code: 999999 Parent’s/ Guardian’s Contact No: 999999999

1beginner💡 Understand2 marksShort Answer

Which of the following identifier names are invalid and why?

15intermediate🔧 Apply4 marksLong Answer

Write a program to swap two numbers without using a third variable.

17beginner🔧 Apply4 marksLong Answer

Write a program to find average of three numbers.

19intermediate🔧 Apply4 marksLong Answer

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.

3intermediate🔧 Apply2 marksShort Answer

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):

7intermediate🔧 Apply3 marksShort Answer

Give the output of the following when num1 = 4, num2 = 3, num3 = 2

2beginner🔧 Apply2 marksShort Answer

Write the corresponding Python assignment statements:

5intermediate🔧 Apply2 marksShort Answer

Write the output of the following:

9intermediate🔧 Apply2 marksShort Answer

A dartboard of radius 10 units and the wall it is hanging on are 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:

10intermediate🔧 Apply4 marksLong Answer

Write a Python program to convert temperature in degree Celsius to degree Fahrenheit. If water boils at 100 degree C and freezes as 0 degree 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)

13beginner🔧 Apply4 marksLong Answer

Write a program to enter two integers and perform all arithmetic operations on them.

14beginner🔧 Apply4 marksLong Answer

Write a program to swap two numbers using a third variable.

16beginner🔧 Apply4 marksLong Answer

Write a program to repeat the string “GOOD MORNING” n times. Here ‘n’ is an integer entered by the user.

Page 1
Class 11 Computer Science Chapter 5: Getting Started with Python — NCERT Questions & Answers