Python Programming Tutorial - 18: The FOR Loop

preview_player
Показать описание
In this tutorial we'll check out the FOR Loop in python and see how it is different from the WHILE Loop.
Рекомендации по теме
Комментарии
Автор

#Counting the number of vowels in the name

name=input("Please enter your name: ").lower()
name_list=list(name)
count=0
for i in name_list:
if(i=='a' or i=='e' or i=='i' or i=='o' or i=='u'):
count=count+1
print("Number of vowels in your name is/are: ", count)

applicationsecurity
Автор

I am not understanding, what is the use of letter here? an explanation would be appreciated.

ashutoshchaudhary
Автор

when I write my name there come SyntaxError: invalid syntax

IShowSpeedCrunch
Автор

how to use it with numbers like 1 to 5 or similar thing

phannindramukkamalla
Автор

SIR ERROR IS COMMING WHILE USING INPUT FUNCTION

divypratapsingh
Автор

how do you use this code to display the message that no vowels were found ?

ae
Автор

what is difference between for loop and while loop
what is for loop doing here
how is this program working im unable to understand please explain me

computerman.online
Автор

where did letter come from? and how does the program know to count vowels?

CasualPhilosopher
Автор

what kind of data type does name have here???

kousikloho
Автор

when i tried to input my name its showing nameerror
how to use the input function

Bhargavdas
Автор

I am getting an error, name 'Letter' is not defined. please help me

ciscotech
welcome to shbcf.ru