Posts

Image
 DAY 29(CODE INFINITY) As everyone is having their summer breaks now so I have decided we should also take a summer break of 5 to 10 days and then continue from where we left so till then enjoy and keep exploring  
Image
DAY 28(CODE INFINITY) In this world full  of competitiveness we all want to succeed but sometimes you put your all and didn't make then wait for your time someday you will get it maybe this was not your time so start focus on your work on yourself so Let's get started with this and practice break and continue today... Code for this is : for i in range(1,101,1):     print(i ,end=" ")     if(i==50):         break     else:         print("Mississippi") print("Thank you") Screenshot of repel : Link of the repel: https://replit.com/@shwetaantil97/19-Day-19-break-and-continue#main.py
Image
DAY 27(CODE INFINITY) Today here is another question which is based on f string which we have done in previous blogs so Let's get started .. Question: Write a program to insert  your name and age in the string. Here is answer for this you can take help from this... name = 'Tushar'   age = 23   print(f" Hello, My name is {name} and I'm {age} years old.")  Screenshot for repel which shows how it give output: Link of the repel: https://replit.com/@shwetaantil97/insert-name-and-age-in-string
Image
DAY 26(CODE INFINITY)  Here is a question for you' all today ....... Question : Write a program to greet all person names stored in a list L1 and which starts with 's'  L1 =["Harry", "sohan", "sachin", "rahul"] you should try it yourself as some find it very easy and some okay okay so just give it a try everyone . answer for this is given below you take help from that also code for this question is: l1 = ["Harry", "sohan", "sachin" ,"rahul"] for name in l1:   if name.startswith("s"):     print("hello",name) Screenshot of the repel: Link of the repel: https://replit.com/@shwetaantil97/greet-everyone-name-starting-with-s
Image
DAY 25(CODE INFINITY) Hii everyone a new day in our life with this beautiful day Let's start a new topic string formatting as the topic name suggests we have to format the string and this can be done using two method : 1. format method 2. f-strings f-string can be formatted in much same as str.format() means format method syntax is simple for both methods so Let's get started... Format method : details = "I am {} from{}" name = "Shweta" state = "Haryana" print(details.format(name,state)) f-strings details = "I am {} from{}" name = "Shweta" state = "Haryana" print(f"I am {name} from {state}") if we want to print the value of the variable in the string then you can use the double curly brackets let me show you how to write this  details = "I am {} from{}" name = "Shweta" state = "Haryana" print(f"I am {{name}} from {{state}}") Screenshot of the repel showing outputs of th...
Image
  DAY 24(CODE INFINITY) Hey everyone, Today let's see who is pass or fail in exams so for this we write a code in which we provide the passing marks and also it takes input from you and calculate total and compare if it is greater than passing marks or not so Let's get started... a= int(input("Enter marks of subject: ")) b=int(input("Enter marks of subject: ")) c=int(input("Enter marks of subject: ")) d=a+b+c e=d/300 f=e*100 if(a>=33 and b>=33 and c>=33 and f>=40):   print("you are pass") else:   print("better luck next time") Screenshot of the repel: Link of the repel: https://replit.com/@shwetaantil97/pass-or-fail#main.py
Image
 DAY 23(CODE INFINITY) As we have seen a star pattern yesterday we also practice some more patterns today when I  started writing code for the pattern. I was not confident at that time but when output came I feel like I can do anything dude and frankly telling when I don't know something, I start writing no matter it is right or wrong I just write it and press enter key whatever I get , I made changes according to my need so in my thought starting is important you'll also heard first step is always the hardest with this Let's get started ... First Pattern: name='*' for i in name:       print(i,end=" ") print('\n') name1='**' for i in name1:       print(i,end="  ") print('\n') name2='***' for i in name2:       print(i,end="  ")       print()   Second pattern: for i in name:       print(i,end=" ") print('\n') name1=' ***' for i in name1:       print(i,end="  ") print(...
Image
  DAY 22(CODE INFINITY) Today we will see some codes to print some pattern using loops so Let's get started with a simple pattern and that is: * * * * * * we will print this using a code: name='*' for i in name:       print(i,end=" ") print('\n') name1='**' for i in name1:       print(i,end="  ") print('\n') name2='***' for i in name2:       print(i,end="  ") Screenshot of the repel: Link of the repel: https://replit.com/@shwetaantil97/star-patterns#program%20to%20print%20star%20pattern%201,2,3%20star%20pattern.py
Image
 DAY 21(CODE INFINITY) Hey everyone, Today I am giving you all a Quick Quiz and you all can give your answers to me if you want I am also giving the link of the repel which have the solution and screenshot you can also take help from that so Let's get started... Quick Quiz : Write a program to print yes when the age entered by the user is greater than or equal to 18. I know some find it quite easy but I just want you all to try that's why I have given easy one with time we will increase the level and you all can give the link of repel or any other interpreter you are using in the comment section.  All the best... Screenshot of the repel : Link of the repel: https://replit.com/@shwetaantil97/Quick-Quiz Use them if needed.
Image
  DAY 20(CODE INFINITY) Today we are gonna discussing the code if you are selected or not .It's quite interesting na that this will decide your selection but it   is only  a database where data already entered and it just provide whether you are in list or not same like result already made and on result date you just need to enter your name and check whether you made it or not so Let's get started... name=input("Enter your name : ") if name in ("shweta","Mohit","Anjali","Rishika","shreya","akshita","surbhi","annu","Nividita", "Meemansha"):   print(name, "you are selected") else:   print("you are not selected. It's ok try another time") Screenshot of the repel:   Link of the repel: https://replit.com/@shwetaantil97/you-got-selection-or-not#main.py