Difference between revisions of "Count the Vowel"

From CompSciWiki
Jump to: navigation, search
 
(Step 1:)
Line 4: Line 4:
 
|Body=
 
|Body=
  
== Step 1: ==
+
{{Template:1010ExtraLabs
 +
|Chapter_TOC=[[Extra Labs]]
 +
|Previous=[[Introduction to Python]]
 +
|Introduction=count the number of vowels in a string given by the user
 +
|Body=
 +
==Solution==
  
 +
First, we need 3 variables:
 +
input -
 +
done -
 +
vowelCount -
 +
 +
Second, we need get the input using raw_input(prompt)
 
{{CodeBlock
 
{{CodeBlock
|Code=Bla4;
+
|Code=
 +
#get the input from user
 +
input = raw_input("Enter a sentence")
 +
}}<br />
 +
 
 +
Then we need to check the vowel
 +
{{CodeBlock
 +
|Code= bla
 +
 
 +
}}
 +
 
 +
 
 +
 
 +
 
 
}}
 
}}

Revision as of 12:53, 3 April 2012

{{Template:1010ExtraLabs |Chapter_TOC=Extra Labs |Introduction=How are you doing?. |Body=

COMP 1010 Home > Back to Extra Labs

Introduction

count the number of vowels in a string given by the user

Solution

First, we need 3 variables: input - done - vowelCount -

Second, we need get the input using raw_input(prompt)

 #get the input from user
input = raw_input("Enter a sentence") 

Then we need to check the vowel

 bla