Posts

Showing posts with the label Python

Interactive Match the Following Std- VII Python Lesson No 5,6,7

Interactive Match the Following Match the Following Drag and drop the correct answer from the given options into the empty box beside each term. Once done, click the "Submit" button to check your answers.

Write the Following Pythons Program.

    Write the Following Pythons Program. ===========================================================================   1 . Even or Odd Checker Write a Python program that asks the user to enter a number and checks if it is even or odd . num = int(input(“Enter Number”)) in num%2==0 print(“Even Number”) else: print(“Odd Number”)       2. Based on Area of a Rectangle       Write a Python program that asks the user to enter the length and width of a rectangle and calculates its area. length =float(input(“Enter length”)) width =float(input(“Enter width”)) area=length*width print(“Area”,area)   3. Multiplication Table Generator         Write a Python program that asks the user for a number and then prints its multiplication table    from 1 to 10.   num = int (input(“Enter a number:”)) for I in range (1,11) print(num, x, i , “=”, num*1)     4. Student Grade Ca...

Control Flow & Object-Oriented Programming Fill in the blanks. - Interactive Worksheet

Interactive Worksheet Interactive Worksheet Chapter 4: Control Flow 1. The if statement in Python is used for ________. Select an answer decision-making loops iteration 2. The ________ statement executes a block of code when the condition in the if statement is false. Select an answer else elif for 3. The elif statement allows checking of ________ conditions. Select an answer multiple single conditional 4. A for loop iterates over a ________. Select an answer sequence variable function 5. The while loop executes as long as the ________ remains true. ...

Chapter 7: Data and RDBMS - Python

Chapter 7: Data and RDBMS Chapter 7: Data and RDBMS Fill in the Blanks 1. _______ refers to information that is collected, stored, and processed. Answer: Data 2. Spreadsheets are used to organize data in _______ and columns. Answer: rows 3. _______ is a database management system based on the relational model. Answer: RDBMS 4. A _______ key uniquely identifies each record in a table. Answer: primary 5. A _______ key is used to link two tables in a database. Answer: foreign 6. The process of organizing tables to minimize redundancy is called _______. Answer: normalization 7. In SQL, data is stored in _______. Answer: tables True or False 1. Data can be in the form of text, numbers, images, and videos. Answer: True 2. Spreadsheets do not allow vis...

Chapter 6: Modules and Packages - Python

Chapter 6: Modules and Packages Chapter 6: Modules and Packages Fill in the Blanks 1. A _______ in Python is a file containing Python definitions and statements. Answer: module 2. To create a module, the file must be saved with a _______ extension. Answer: .py 3. The keyword used to import a module in Python is _______. Answer: import 4. The _______ module is used to manipulate dates and times in Python. Answer: datetime 5. The _______ module provides access to mathematical functions. Answer: math 6. The math.sqrt() function returns the _______ of a number. Answer: square root 7. The directive %B is used to display the _______ name in full. Answer: month True or False 1. A module in Python can only contain one function. ...

Chapter 5: Object-Oriented Programming - Python

Chapter 5: Object-Oriented Programming Chapter 5: Object-Oriented Programming Fill in the Blanks 1. A ________ is a blueprint for creating objects in Python. Answer: class 2. The ________ method initializes an object’s attributes. Answer: __init__ 3. The process of one class inheriting from another is called ________. Answer: inheritance 4. The term ________ refers to an object’s ability to take many forms. Answer: polymorphism 5. Encapsulation restricts access to certain ________ of an object. Answer: attributes 6. The self keyword represents the ________ instance of a class. Answer: current 7. A ________ is an instance of a class. Answer: object True or False 1. Classes and objects are the core of Object-Oriented Prog...

If Statements Examples- Python VII

Image
Interactive Python Activities Toggle Dark Mode Interactive Python Activities Example 1: Grading System Write a Python program to calculate the grade of a student based on their marks. The program should prompt the user to input a numerical grade (0–100) and determine the letter grade using the following ranges: 90–100: Grade A 80–89: Grade B 70–79: Grade C 60–69: Grade D Below 60: Grade F marks = 85 if marks >= 90:  print("Grade: A") elif marks >= 80:  print("Grade: B") elif marks >= 70:  print("Grade: C") elif marks >= 60:  ...

Python Revision - VII

Python Revision Materials for Std VII Python Revision - VII Questions and Answers 1. What is Python? Ans: Python is a high-level programming language known for its readability and ease of use. 2. Where is Python used? Ans: Python is widely used in fields such as web development, data analysis, artificial intelligence, and scientific computing. 3. Why should we learn Python Ans: Python is easy to learn, versatile, and applicable in various domains. 4. Who created Python and when Ans: Python was created by Guido van Rossum and first released in 1991. 5. What are three numeric types in Python. Ans: Data types in Python include int for integers, float for decimals, str for strings, list for ordered collections, and dict for key-value pairs. 6. What are variables in Python? Ans: Variables in Python store data values and can be assigned without a specified t...