Question: The code is required to produce the output: Please input a first string : This is the Exam for INF 1 5 1 1 2

The code is required to produce the output:
Please input a first string : This is the Exam for INF15112022
What letter are we counting : e
The count is : 2
Which code can be used?
a.
s=input('Please input a first string : ')
l=input('What letter are we counting : ')
t=s.count(l.lower(),0, length)+ s.count(l.upper(),0, length)
print('The count is : %d'%(t))
b.
s=input('Please input a first string : ')
l=input('What letter are we counting : ')
t=s.count(l.lower, 0, len(s))+ s.count(l.upper, 0, len(s))
print('The count is : %d'%(t))
c.
s=input('Please input a first string : ')
l=input('What letter are we counting : ')
t=s.count(l,0, len(s))
print('The count is : %d'%(t))
d.
s=input('Please input a first string : ')
l=input('What letter are we counting : ')
t=s.count(l.lower(),0, len(s))+ s.count(l.upper(),0, len(s))
print('The count is : %d'%(t))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!