Posts

Showing posts from May, 2022

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 program to check whether the PIN entered by the user is four digit number or not

Image
  Algorithm  Step 1 : start Step 2: declare a string  Step 3: return the length of list by using len function  Step 4 : check the len == 4 then print " user has entered four digit pin " if not print " invalid number of digits "  Program :  pin = input(" enter the pin : " ) i = len(pin)  if  i == 4:   print("user has entered four digit pin ") else:   print(" invalid number of digits")

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