Computer Science, asked by Anirudhchilukuri101, 4 months ago

Write a python program which takes a string from the user and store it in s and check whether "and" is in the string or not

s = str(input("Enter the string:"))
if "___" __ s:
print("Yes and is in the string")
else:
print("")

Answers

Answered by shobhabidlan01
1

Answer:

To get the first N characters of the string, we need to pass start_index_pos as 0 and end_index_pos as N i.e. The value of step_size will be default i.e. 0. It will slice the string from 0th index to n-1-th index and returns a substring with first N characters of the given string.

Answered by Anonymous
2

Answer:

1.

Write a program to print every character of a string entered by user in a new line using loop.

2.

Write a program to find the length of the string "refrigerator" without using len function.

3.

Write a program to check if the letter 'e' is present in the word 'Umbrella'.

4.

Write a program to check if the word 'orange' is present in the "This is orange juice".

5.

Write a program to find the first and the last occurence of the letter 'o' and character ',' in "Hello, World".

6.

Write the string after the first occurrence of ',' and the string after the last occurrence of ',' in the string "Hello, Good, Morning". World".

7.

Write a program that takes your full name as input and displays the abbreviations of the first and middle names except the last name which is displayed as it is. For example, if your name is Robert Brett Roser, then the output should be R.B.Roser.

8.

Check the occurrence of the letter 'e' and the word 'is' in the sentence "This is umbrella".

9.

Write a program to find the number of vowels, consonents, digits and white space characters in a string.

10.

Write a program to make a new string with all the consonents deleted from the string "Hello, have a good day".

☺️☺️

Similar questions