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 variables

 Welcome guys , 

Hope you have seen by intro blog about python. If not , have a look at Previous

In this blog , we are going learn about variables. 

What are variables ? 

The variables are the one which stores the values. 




Like :

a = 5

Here , value '5' is stored in variable 'a'.

Once we print the variable 'a' we will get the values 5 . Like shown below in the screen shot 

Python integers

Output:


These the desired output which we get 

Types of variables:

  • Integer 
  • Float 
  • String

String :
It is a collection of characters. It can be declared in both double quotations and single quotations.let me take a example to explain it. 
Eg 
a = " lucky man"





Output:


String coming to work this 

Float is addition to integer which contains decimal part too 

Eg :

2.34, 4 97 .......

You can find the type of the variable by using  the type() function you may have a question what is functiions . I  will explain it in furture . 

Syntax:

type(var)

Program:

a = 5

print(type(a))

b = "honest guy"

print(type(b))

Look at this 

Output 

Multiple assignments of variables 
If we have lot of variables in this way 
Name and age combination 
Charan , Irfaan , gokul , harsha = 23,34,45,54
See the below program to understand. 
Group of variables

When same value should be assigned to no.of. variables then 
Eg 
 When your friends has a same age then this goes to coding use this 

Amit.                ------------!
Arjun                              !        
Tom.                                !
Charan.                           !------------- 19 years
Irfaan.                             !
Loki.                                !
Harsha.        --------------- !    

Code to perform this 
amit = arjun= tom = charan = Irfaan = loki = harsha = 19

Hope you have gained some knowledge from blog. 
Support me through facebook page : Pyandroid

Comments

Popular posts from this blog

Python tupes

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