Advertisement
xah

[code]5_082716

xah
Aug 27th, 2016 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. '''
  2. Name: Aileen Huang
  3. Date: Aug 27, 2016
  4. Title: Number Adder
  5. '''
  6.  
  7. print('This code will calculate the sum of numbers from 1 to your number.')
  8.  
  9. def addition(number):
  10.     l = list(range(1, number + 1))
  11.     return print(sum(l))
  12.  
  13. print('Please enter a number.')
  14.  
  15. addition(int(input()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement