Class:- 7th Computer
Lesson 8 ( Working With Python)
Page No- 127 exercise
What will be the output of the following ?
1. a= input("20 ") = 20 10
2. s=input(" Enter your name") = Enter your name Gopal Sir
3. x = float(input ( " enter your salary " )) enter your salary 40000.58
4. z=int (input ("20" +"30 " ) ) 20 30 50
5. y= int(input(44*3)) 13243
Which is bold text or digit these are given by user
PAGE- 131 Exercise
( This is your homework )
Hardwords:-
One page leave of Hardword
Find Hardword ( This is your homework)
Very Short question and Answer .
Q.1 Why do we use "int" and "float" Data Type in Python ?
Ans:- Data type 'int' and 'float' are used to take input of numeric values .
Q.2 What is the use of precedence of operators ?
Ans:- Precedence of operators refers to the order in which the operators are evaluated.
Q.3 What are logical operators ?
Ans:- These operators are used when you want to compare two or more relational expressions.
Q.4 What is string in Python ?
Ans:- String is the text value which is used to put anything in text format.
Q.5 What is the use of Concatenation operators (+) ?
Ans:- It is used to join two stings . Like a=("20" + "30 ) print( a) so output is 20 30
Long Question /Answer
Q.1 Explain the Operator .
Ans:- Operators are symbols that represent arithmetic and logical operations on operands and provide a meaningful result. If we use some numbers like 45 , +35 , -23 , 23*3 . Hear the number 45 , 35,23 is the operands and whereas the symbols +, - and * is called operators.
Q.2 What is the difference between relational and assignment operators ?
Ans:- Relational Operators:- They are used for depicting the relationship between operands. These operators compare two value, and determine the result in Boolean expression , which can be either True or False.
Assignment Operators :- The assignment operators (=) is used for assigning the value of an expression to a variable . The value is assigned on the right side of the various written on the left of it. example:- a=10, B=40 and so on.
Q.3 In string manipulation , what is the use of "*" operator ?
Ans:- In string manipulation we use (*) operators for replicating a given string a numbers of times. It is also known as replication operator.
Example :- If we enter a string ( Ram) ,
a= Ram
print( a)
output - : Ram
after string manipulation:-
a=Ram
print(a*3)
output:- RamRamRam
Q.4 What is the Input ( ) function ? (question is replaced)
Ans:- The input function allows programmers to take the input from the users . The use of this function make the program user interactive .
The input( ) function take stings only. If you enter a numeric value in input( ) function.
Example :- a= input (" enter your name :- " )
print(a)
Output :- enter your name -: Gopal Sir
Q.5 What is PEDMAS ?
Ans:- PEDMAS is used to extend or expand of BODMAS . The PEDMAS means is "Parenthesis , Exponents , Division, Multiplication , Addition and Subtraction" but BODMAS means is " Brackets of Division, Multiplication , Addition and Subtraction) . So we use PEDMAS in python.
"Comment and ask me if you have any doubt "
Computer Quiz on Telegram -
Sir, question no 5 karna hai kya notebook me
ReplyDeleteYes , Q-5 bhi krna hai Short aur long dono ke question krne hai
ReplyDeleteSir q no 4 karna ha
ReplyDeleteYes Krna hai
ReplyDelete