Jump to content



Photo
- - - - -

syntax error in python programm (fx-CG50)


  • Please log in to reply
No replies to this topic

#1 Lost_Player

Lost_Player

    Newbie

  • Members
  • Pip
  • 3 posts

  • Calculators:
    fx-CG50

Posted 10 April 2022 - 07:32 PM

Hello guys, maybe you can help me.
I have written a programm with Python in TigerJython about Pascall's Triangle and it's working on PC but when I transver it to my Caculator (fx-CG50) and try to run it, it's saying there is a syntax error (invalid syntax). 
Do you know what it could be?
 
 
 
 
if it helps thats the code:

input_num = int(input("anzahl zeilen:"))
list = []
for n in range(input_num):
    list.append([])
    list[n].append(1)
    for m in range(1,n):
        list[n].append(list[n-1][m-1]+list[n-1][m])
    if(input_num != 0):
        list[n].append(1)
for n in range(input_num):
    print(""*(input_num - n), end = "", sep = "")
    for m in range(0, n + 1):
        print('{0:5}'.format(list[n][m]),end ="", sep ="")
    print()

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users