while running:
- guess = int(raw_input('Enter an integer : '));
+ guess = int(input('Enter an integer : '));
if guess == number:
- print 'Congratulations, you guessed it.';
+ print('Congratulations, you guessed it.');
running = False;
elif guess < number:
- print 'No, it is a little higher than that';
+ print('No, it is a little higher than that');
else:
- print 'No, it is a little lower than that';
+ print('No, it is a little lower than that');
else:
- print 'The while loop is over.';
-print 'Done';
+ print('The while loop is over.');
+print('Done');
RefactoringTool: Files that were modified:
RefactoringTool: codes\if.py
RefactoringTool: codes\while.py