repl.it
@big_deelan/

Past Paper Code Probs

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#Q. 03
number = 0
while number < 1 or number > 10:
  print("Enter a positive whole number: ")
  number = int(input(s))
  if number > 10:
    print("Number too large.")
  else:
    if number < 1:
      print("Not a positive number.")
c = 1
for k in range(number):
  print(c)
  c = (c * (number - 1 - k) // (k + 1))
Fetching token
?