Posts

Showing posts from May 1, 2021

Driving eligibility teller program made with python.

 A program which tells that you are eligible to drive or not.  print ( "Enter your age" ) age= int ( input ()) if age> 18 : print ( "tussi to pakka gaddi chala loge" ) if age< 18 : print ( "na beta tumse drive na ho paega" ) if age== 18 : print ( "beta pahaili fursat me apna lisence banvale " ) #upper one code is normal but next one is advance in which someone tell his/her age like impossible then our program will not be confused.. #advance driving age checker print ( "enter your age" ) age= int ( input ()) if age<= 12 and age>= 1 : print ( "you should not even think about driving" ) elif age> 12 and age< 18 : print ( "you can't drive" ) elif age== 18 : print ( "Go and get a driving license first" ) elif age> 18 and age< 60 : print ( "Absolutely you can drive" ) else : print ( "You are joking" ) I have made these by using If , E...

How to find Median in maths class 10

 This is a code in which if have created how to find median of given data.. Actually when I was in class 10 their was a chapter in maths in which we have to find median of given data so that time I wrote this code to help me .. print ( "This is a calculator which calculate median" ) print ( "So first put value of L" ) l= input () print ( "Now enter the value of n" ) n= input () print ( "Put value of cf" ) cf= input () print ( "Enter value of f" ) f= input () print ( "put value of h" ) h= input () print ( "Your median is" , int (l)+(( int (n)/ 2 )-( int (cf))/( int (f)))* int (h)) but their is a problem in this code it does not really find the median which is correct answer but if you will try to do this calculation in a normal calculator so you will get same value as this code will give... as I told you I am a beginner so as I am learning so I will try to upgrade this ...

Some variable functions.

  Some variable functions. It is a Program which first takes input from user for a data and then it print it's length by len(variable name) function , tell it's type of which the data is by type(variable name) function then tell it is numeric value or not by true and false by variable_name.isnumeric() function, replace(" "," ") for replacing ,  uppercase and lowercase, and x.isalnum() for having space or not.. #Day3 print ( "enter your data" ) x= input () print ( "length of your data is" , len (x)) print ( "type ok" ) a= input () print ( "and type of your data is" , type (x)) print ( "type ok" ) b= input () print ( "it is numeric value or not," ,x.isnumeric()) print ( "type ok" ) c= input () print (x.replace( "good" , "pro" )) print ( "with lower case" ,x.lower()) print ( "type ok" ) d= input () print ( "with uppercase " ,x.upper()) print (...

Simple addition calculator of two numbers.

Simple addition calculator by Python. #Day2 Here is my another code of a small calculator which first take input from user and then second number then just add them both. Please ignore other stuff as I told you I am a beginner.😊 #var1 ="70" #var2 = 345 #var3 = 4 #var4 = 23.334 #var8 = "90" #print(100*str(int(var1)+int(var8))) """ str() int() float() """ #print(10 * "hello world\n") print("enter your first number") x = input() print("you entered", int(x)) print("enter your second number") y = input() print("your addition is", (int(x)) + int(y))

Some string datatype functions slicing etc.

Here is my Python code related about string datatype. #Day1 And other string datatypes commands. like length of our string and slicing of that string.  #mystr = "anant is a good boy" #print(len(mystr)) #print(mystr[0::]) #x="anant is an Intelligent boy" #print(len(x)) #print(x[1:19:-1]) print("enter your name") x=input() print(len(x)) y='anant' print(type(x),print((y)))