human
Minimum moves required to type a word in QWERTY based keyboard | Function that calculates the moves required to prthe current String.
row1 has qwertyuiop , row2 has asdfghjkl , and row3 has zxcvbnm Store the row number of each character.
String length.
Initialise move to 1.
Traverse the String.
If current row number is not equal to previous row then increment the moves.
Return the moves.
Driver Code.
Given String str.
Function Call"
How can the above be solved in Python?

=====
Can you provide a code to minimum moves required to type a word in QWERTY based keyboard and the other steps required?
assistant
#Here is code to minimum moves required to type a word in QWERTY based keyboard and the other steps required.
 def numberMoves ( s ) :
	row = [ 2 , 3 , 3 , 2 , 1 , 2 , 2 , 2 , 1 , 2 , 2 , 2 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , 1 , 1 , 3 , 1 , 3 , 1 , 3 ] ;
	n = len ( s ) ;
	move = 1 ;
	for i in range ( 1 , n ) :
	if ( row [ ord ( s [ i ] ) - ord ( ' a ' ) ] != row [ ord ( s [ i - 1 ] ) - ord ( ' a ' ) ] ) :
	move += 1 ;
	return move ;
if __name__ == ' _ _ main _ _ ' :
	str = " geeksforgeeks " ;
	print ( numberMoves ( str ) ) ;