Exercise 3 solution : Python tutorial 32

preview_player
Показать описание
Guys please help this channel to reach 80,000 subscribers. I'll keep uploading quality content for you.

Python is easy programming language to learn and anyone can learn it, and these tutorials are 100% free in hindi.

You can share this playlist with your brother, sisters and friends. This will surely add some values to their life.

If you follow this complete playlist of python tutorial surely you will learn everything about python programming language.

This is Exercise 3 solution of chapter 2

Рекомендации по теме
Комментарии
Автор

username, single_char = input("Enter username and a single char followed by comma: ").split(", ")
print(f"length is {len(username)}")
username = username.lower()


this code is getting me the right answer but taking more space but I m happy that I m learning and my thought process is growing, thank you for this wonderful exercise and course.

prashantbhatt
Автор

I used this method and it works just fine..
name, char=input("Enter a name and a character, use comma seperation : ").split(", ")
length=len(name)
upper=char.upper()
lower=char.lower()
count=name.count(upper) + name.count(lower)
print(f"Length is {length} and the count of character is {count}")

MohsinKhan-glnf
Автор

i used this method and its works
name=input("type you name: ")
character=input("write a single character: ")
print(len(name))
print(name.count(character))

SumeethPrakash-tpsh
Автор

sir pehele to bilkul bhi samajh nahi aaya fir doosri baar dekha to bilkul ache se samajh aagaya

xNnja
Автор

Pasand to ayi per uppar se chalaya gya .Thanks

MrRavikantverma
Автор

nm, ch=input("enter your name and character to be counted seprated by comma").split(", ")
print(f"lenth of your name is {len(nm)}")
nm1=nm.lower() #will converts upper text into lower text and lower into upper
nm2=nm.upper() # will convert lower into upper and upper into lower same
#will add both tata collected from nm1 and nm2
print(f"total character are {ttlch}")

Physicsandanimation
Автор

Print(f"character count :[name. lower().count char. lower())
Is also case sensitive sir
When we give input A(capital letter)
Then output is sir

prabhakumari
Автор

Name, letter = input("Enter your Name and the letter you want to count in your name seperated by comma").split(", ")

print(f"the lenght of your name is {len(Name)}")

Cap = letter.upper()
Small = letter.lower()

count1 = Name.count(Cap)
count2 = Name.count(Small)

print(f"the number of character {letter} in your name is {count1+count2}")

sameerparnami
Автор

wow thank u so much i love this problem

usama
Автор

a, b=str(input("enter your name----\nenter any character----\n")).split()


print("length of your name is, ",len(a),"\nand",b,"occurs ", a.count(b)+a.count(b.upper()), "times")

prakashrawat
Автор

i did it like this :

name, letter = input("enter your first name and a letter separated by a comma : ").split(", ")
length=len(name)
name1=name.upper()
letter1=letter.upper()
count=name1.count(letter1)
print(f"Hi {name} your first name is of {length} characters.\n Letter {letter} occured {count} time(s) in your name.")

dipankur
Автор

a, b= input("type your name and a single character ").split(", ")
print(f'length of your name is {len(a)}')
a = (f' {a.lower()} {a.upper()}')
print(f'count the character that you inputed {a.count(b)}')

zalabhupendrasinh
Автор

I used this method.
x, y = input("Type a word and then a letter from that word seperated by comma").split(", ")
print(len(x))
a=x.upper()
b=x.lower()
c=a.count(y)
d=b.count(y)
e=int(c)+int(d)
print(e)

sudarshansinha
Автор

i have made this,
name, char = input("Put your name and anyone character comma separated: ").split(', ')
total = name + char
print(len(name))
print( total.count(char) )
:)

muhammadhamzahaneefqureshi
Автор

Hi Harshit
I have one doubt on count() method.
I am explaining it by an example:
eg: Name='Bhavya Madaan"
print(Name.count(''))--> what should be it's output.

bhavyamadaan
Автор

print("Character count: + can be done this way too!

saribkhan
Автор

Okk sir and please Thora jldi upload kriye video

techyshivang
Автор

name, char = input ("type the name & Character needs to count").split(", ")
print(len(name))
lowername = name.lower()
lowerchar = char.lower()

#or
print(f"your name lenght {len(name)} Character count

jassi
Автор

name, character = input("Enter name and Character seperated by comma:").split(", ")
print(len(name))



This works with space and without space past comma

amsxngroups
Автор

name, char = input('enter comma separated name and char: ').split(', ')
print(f'length of you name is: {len(name)}')
print(f'character count is: {name.lower().count(char)}')


count method mei dobara lower daalne ki zarurat nahi hai mere hisaab se kyu pehle hi lower method se sab lower case mei convert ho chuka hai

ytp
join shbcf.ru