grandfathermagic

input_number_output_list

Apr 28th, 2020
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. user_input = int(input("you pick a number an I will tell you what are the numbers before him  "))
  2. # user_input = 5
  3.  
  4.  
  5. def input_number_output_list(number):
  6.     i = 0
  7.     out_put_list = []
  8.     while i < number:
  9.         out_put_list.append(i)
  10.         i += 1
  11.     Sentence = f"this is a list of the numbers before the one you pick {out_put_list}"
  12.     return Sentence
  13.  
  14.  
  15. print(input_number_output_list(user_input))
Advertisement
Add Comment
Please, Sign In to add comment