Advertisement
J2112O

Python While Loop Help

Jul 9th, 2015
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.15 KB | None | 0 0
  1. def printMultiples(n):                                                          
  2.   5     i = 1                                                                      
  3.   6     while i <= 6:                                                              
  4.   7         print n*i, '\t',                                                        
  5.   8         i = i + 1                                                              
  6.   9     print                                                                      
  7.  10                                                                                
  8.  11 def main():                                                                    
  9.  12     x = raw_input("What number do you want to see multiples of ? ")            
  10.  13     printMultiples(x)                                                                                          
  11.  14                                                                                
  12.  15                                                                                
  13.  16 if __name__ == "__main__":                                                      
  14.  17     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement