Write a python program that takes 2 inputs from the user. The first input is a string and the second input is a letter. The program should remove all occurences of the letter from the given string and print the output. If the letter is not found in the string and the length of string is greater than 3, then remove the first letter and last letter of the given string and print it. Otherwise print the string as it is. You can assume that all the input will be in lowercase letter.
Given a string, create a new string with all the consecutive duplicates removed.
Hint: You may make a new string to store the result. You can check whether the current character and the next character are the same, then add that character to the new string.
Note: Only consecutive letters are removed not all duplicate occurences of a letter. You may try doing this alternative i.e. removing all duplicate letters from a given string, for your own practice.
Write a python program that splits a given string on a given split character. The first input is a String and the second input is the character that will be used to split the first String.
[You cannot use the built-in split function for this task]
Write a Python program that takes a String as input from the user, removes the characters at even index and prints the resulting String in uppercase without using the built-in function upper().
Write a Python program that takes a string as an input from the user containing all small letters and then prints the next alphabet in sequence for each alphabet in the input.
Hint: You may need to use the functions ord() and chr(). The ASCII value of ‘a’ is 97 and ‘z’ is 122.
Write a function solution that given an integer n and an integer k, returns the maximum possible three-digit value that can be obtained by performing at most K increases by 1 of any digit in N
Write a Python program that will ask the user to input a string (containing exactly one word). Then your program should print subsequent substrings of the given string as shown in the examples below.
=====================================================================
Hints(1): You may use "for loop" for this task.
Hints(2): You may use print() function for printing newlines.
For example:
print(1)
print(2)
Output:
1
2
=====================================================================
We can use print(end = "") to skip printing the additional newline.
For example:
print(1, end ="")
print(2)
Output:(prints the following output right next to the previous one)
12
=====================================================================
Sample Input 1:
BANGLA
Sample Output 1:
B
BA
BAN
BANG
BANGL
BANGLA
.
=====================================================================
Sample Input 2:
DREAM
Sample Output 2:
D
DR
DRE
DREA
DREAM
write a c program to print the prime numbers in a singly linked list
Command line argument in java programming
Consider you are working as a developer in a software house “XYZ” and you have to develop a program that will detect the Real time objects by using the Camera. As a developer, you have to decide which programming paradigm would be feasible to design develop this system.
Identify the programming paradigm from the list given below and justify your answer with proper reasons.
Object Oriented Programming Paradigm
Procedural Programming Paradigm