Online Shiksha

By Savita S. More

Class 8 Computer More on Python

Learn Class 8 Computer More on Python

 

Q- Which command is used to display statement in python?

The command used to display a statement in Python is print().

 

Q- Which command used to take value from user?

The command used to take a value from the user is input().

 

Q- What is built in function?

A built-in function is a function that is provided by Python itself and can be readily accessed by users without needing to define it.

 

Q- Which statements are used to perform an action based on a given condition?

Conditional statements (if, elif, and else statements) are used to perform actions based on given conditions.

 

Q- What do you mean by operands?

Operands are the variables or values upon which an operator performs an operation.

 

Q- What is the use of len()?

The len() function is used to determine the length of a sequence, such as a string, list, or tuple.

 

Q- What is function?

A function is a block of reusable code that performs a specific task.

 

Q- Which keyword is used to define function?

The def keyword is used to define a function in Python.

 

Q- Which keyword is used with for loop?

The for keyword is used with the for loop in Python.

 

Q- Which keyword is used to add item in list?

The append() method is used to add an item to a list in Python.

 

Q- What is the output of below code?

A=10

B=20

Print(max(a,b))

The output of the code print(max(a, b)) will be 20, as it prints the maximum value between variables a and b.

 

Q- Which data types is used to store whole numbers?

The data type used to store whole numbers is int (integer).

 

Q- Which datatypes is used to store a series of characters?

The data type used to store a series of characters is str (string).

 

Q- Mention the name of any two types of operator?

Two types of operators are arithmetic operators (e.g., +, -, *, /) and relational operators (e.g., ==, <, >).

 

Q- What is arguments and parameters?

Parameters are special variables in a function definition that are used to pass values into the function. Arguments are the actual values passed to the function when it is called.

 

Q- Which symbol is used to write comment in python?

The symbol # is used to write comments in Python.

 

Q- Mention the examples of data structures.

Examples of data structures include lists, tuples, dictionaries, and sets.

 

Q- What is the full form of ide and idle?

The full form of IDE is Integrated Development Environment, while IDLE stands for Integrated Development and Learning Environment (which is specific to Python).

 

Q- In python list is always start with……………

In Python, a list is always started with [ (an opening square bracket).

 

Q- At a time a variable holds ……….. Value.

At a time, a variable holds a single value in Python.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

online-shiksha © 2023 Frontier Theme
Online Shiksha