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

Python tupes

 Hello friends, today we are going to dicuss about  tuples . It is one of the data type in python . Take a look at  before blog Previous.

Tuples

Table of contents 

  • Tuples 
  • And its Operations
First,let's try to learn the syntax of the tuples 
A = (var1 , var2 , var3 , var4 .........)
Here, 
A is name of the tuple 
var1 ,var2, var3 ... are elemnts in the tuple.
The biggest advantage in the tuples is you have amy any yype of values(string , int, float ) in one tuple.
tup = ("apples", "pineapple ",1,7,5)


In the above  video I told tuples are immutable (cannot be updated ) . Try lets try to update it, how does python teacts .

 Indexing
tup = ("apple", "pineapples",1,7 ,5)
tup[0] # accessing index 0 element 
tup[3] # accessing index 3 element 




Slicing :
tup = ("apples","pineapple",1,7,5)
tup[0:3]


Operations 

   Concatenation 
tup = ("apples","pineapple",1,7,5)
tup2 = (3,2,8)
tup + tup2  #,concatenting two tuples. 

Deleting a tuple 
tup2 = (1,7,5)
del tup2 
Checking the length of the tuple 
tup =
("apples","pineapple ",1,7,5)
len(tup)

Repeating the tuple multiple times 
tup = ("apples","pineapple ",1,7,5)
tup*2



This is entire data about the tuple . I don't forget to subscribe.  
My fb page is PyAndroid
Thanks for for reading 
Leave your suggestions and queries in comment box .

Comments

Popular posts from this blog

Python dictonaries

If the sum of 4 times a number A and three times a number B is equal to the sum of number B and seven times the number A, then what is the value of A:B? | CTS previous Aptitude question