The number of 6-digit even numbers that can be made from the number 214635 are:

Image
The number of 6-digit even numbers that can be made from the number 214635 are:  a) 18 b) 72  c) 120 d) 360 Answer:  D from the question we can see we have to form 6 digit number(no repetition) so, let us six blanks as show below : _ _ _ _ _ _  if the number has to be even it has to be end with even number. 214635   from the above digits even numbers are 2,4,6 so, the units digit is 2 or 4 or 6 so, the no.of.ways is 3 remaining 5 digits can be filled with 5! ways  so, the answer is 5!x3 ways                             = 360 ways  remaini

Arthimetic operations in Python

 Hope your enjoying my python series.

Today's topic is about Arithmetic operations , it includes below operations 

Addition(+)

Subtraction(-)

Multiplication(*)

Division (/)

Arithmetic operations



We will start with addition of two variables 

So, declare two variables 

a = 12

b = 34

print("addition of two numbers" ,a+b)

Program 

Arithmetic operations

Output:

Arithmetic operations

Same as it as subtraction too, replace + by - and divison. 

For multiplication use symbol called asterisk(*). 

This is the addition of rwo variables(int) then we will move on to strings.

In strings , addition operation is called as concatenation . Move on to program 

Sen = "blog writing " # declaring a string.

print(sen)

Strings
Output :

Strings

Let me sh2ow me about concatenation of strings. 

sen = "python is good"

sen2 = "and easy"

print(sen + sen2 )

Program 

Concatenation

Output 

Concatenation

As you can observe a there is no space between two words which we have added. To get the space between .

For the above code  , edit print statement as given below

print(sen + " " + sen2)

Program 

concatenation


Output 

Concatenation

This is the addition of strings . As we cannot substract and divide two strings. But ,we can print one string 'n' no .of . times . 

S =  "I love Allu Arjun"

print(s*3)

Screen shot :

Strings

Output :

Strings

This a end of this theory.  Hope it helps you. 

My fb page : PyAndroid

Comments

Popular posts from this blog

The number of 6-digit even numbers that can be made from the number 214635 are:

Python tupes

Python dictonaries