Posts

Showing posts from April, 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 dictonaries

Image
  Good day !!          Hello guys , have a recap at my previous blog . I have explained about tuples.  Previous Context of blogs DICTIONARIES  Operations  Accessing  Updating  Deleting  Length            Today we are  going to learn about dictionaries in python . As we have got many data types(lists , tuples  ... ) why still we are using dictionaries , right ?    You will have a clear idea at the end of this blog . Let's start now !!  Let me explain the disadvantages of list First . In list we cannot access the two different variables at a time . Warch this video for explanation.  Dictionaries        Dictionaries are very unique to other data types . It should be embedded in curly parenthesis "{}". It has two sections one is key and value pair . Dictionaries works  on key-value pair .  Syntax  dict = {k1 : v1 , k2 : v2 , ....... } Key...

Python tupes

Image
 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 . 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  ...

Python lists

Image
 Our wonderful journey is still continued.  Please have a watch on the before blog because this blog  is extension to vefore blog  . Have a look at that Previous .  Context Lists  Operations  Indexing  Slicing  Updating the list Some inbulit functions PYTHON LISTS  What is use of lists ? It is used to make a collection of items. Like in the above pictures. In this list , we can store in all data types like string, integer etc,. Syntax : A = [var1 , var2, var3.. ........] where,  A = name of the list  var1,var2,vars are the elements in the list.  Eg : list = ["apples", "banana", "cherry"] See this video 👇👇👇👇 Lets move on to operations in lists  Indexing  : Same what we have learnt in strings.  Previous Syntax  :  List[0] # for accessing the first element in list List[1] # second element Slicing  : Even this also same as it string. Previous Eg :  list[0:2]  # prints the elements i...

Python strings and its place holders

Image
 We all learnt what are  the python strings. Like concatenation,  repeating one strings in multiple times. Hope that blog has impressed you. If you want to look at the blog Previous . Today's related to strings and but a step forward to the before blog. That is  placeholders  . Context   Indexing  Slicing  Placeholders Indexing             It is one of the operation in string. It is also a numbering given to letter in words in sentence. It is useful to access the characters in the string individually. Sen = "charan loves apples" # declaring a str Indexing of a strung takes places like this  c h a r a n    l o v e s    a p p l e s . ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^      0 1 3 4 5 6 7 8 9 .............. Even the space holds a index too .   This is how the indexing pattern.  If you comes in reverse (from last ) of the sentence. c h a r a n    l o v e s...

Arthimetic operations in Python

Image
 Hope your enjoying my python series. Today's topic is about  Arithmetic operations  , it includes below operations  Addition(+) Subtraction(-) Multiplication(*) Division (/) We will start with addition of two variables  So, declare two variables  a = 12 b = 34 print("addition of two numbers" ,a+b) Program  Output: 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) Output : Let me sh2ow me about  concatenation  of strings.  sen = "python is good" sen2 = "and easy" print(sen + sen2 ) Program  Output  As you can observe a there is no space between two words which we have added. To get the space between . For the above ...

Python variables

Image
 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  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...

Introduction to python

Image
 Hi , My name is charan,  from India. I am starting a blog on python.  Naming this series as Pyandroid .Here I will start with basics and end with advanced topics (including projects) Let me take a quick intro of me  I am charan . I am going to establishing a startup company . My  vision is to educate the people . I have pursed a bachelor degree in computers. I have started this blog to create the awareness in python programming language.   Is python latest language ?       Answer is no , it is older than java. Java was intoduced in 1995. Whereas, Python (first version) is introduced in 1991.       Then why python is famoused in this recent years. Because the world is revolving around the machine learning,  data science,artificial intelligence and  cybersecurity.   Why student has to study python?         The answer is given in the above(underlined ) . Can all can study py...

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