Posts

Showing posts from May, 2024
Image
DAY 4(CODE INFINITY) When I was writing these programmes I  thought these all are simple commands which is in everybody's notebook so what is the purpose of writing then I realized there is a purpose and that is to maintain consistency and line wise all the content in one go . Today I am giving a code which gives output to all the commands which we used to study in string slicing so Let's get started...…  name= "Shweta" print(name[5]) slicing=name[0:4] print(slicing) print("name is break") for character in name:   print(character) print(name.upper()) print(name.lower()) print(name.capitalize()) print(name.center(45)) print(name.count("t")) print(name.startswith("m")) print(name.endswith("t")) print(name.find("h")) print(name.isalnum()) print(name.isalpha()) print(name.islower()) print(name.isprintable()) print(name.title()) print(name.istitle()) print(name.swapcase()) print(name.isupper()) Screenshot of the repel which...
Image
 DAY 3(CODE INFINITY) Before moving to next topic I want to tell you  a small story when I started writing small codes I have errors in those codes also  I don't get  irritated until the error comes 5 or 6 times and I  think that errors are good errors should come they remind me my mistakes and help me to correct them.  So Today I will be giving the code for table of 5 , can be written for table of any other number print(5*1,'\n', 5*2 , '\n', 5*3 ,'\n' , 5*4, '\n', 5*5 , '\n' , 5*6 , '\n' ,5*7 , '\n' , 5*8 , '\n' , 5*9 , '\n' , 5*10 ) Screenshot of repel which shows how it run: Table of 5 Link of repel is given below: https://replit.com/@shwetaantil97/table-of-5#main.py  
Image
      DAY 2(CODE INFINITY) lets start our second day by some basic programmes  like addition of two numbers , multiplication ,division ,subtraction basically use of operators in our code so lets get started . so I know some more functions because I have learn all these basic things before this I have started publishing late but as it says na it's never late to start so in this code we take input from our user x=input("Enter a number: ")   x=input("Enter a number x: ") y=input("Enter a number y: ") print("sum of  number ",x, "and" ,y," is:" ,x+y) In place of + we can also use -, /, * , // , %  etc. for  subtraction ,multiplication , division , remainder  and this is how we can use operators on two numbers given by user let me show you an example of this by moving to replit and show how it works This is the link of replit which i have show what is the output of this code:         https://replit.com/@shwetaantil97/Python?v=1...
Image
                                DAY 1( CODE INFINITY)  Lets start my coding journey with my first code which is everybody's first code who start with python as their first programming language and write his/her first code as print("hello world") likewise everyone start their coding journey and reach at different fields in their field with this today I am starting my journey in this huge tech field where all are masters in their field frankly telling I don't know which path have my interest but ultimate goal is vey clear in my mind . so let's get started this qoute is also not mine but I find it good here.