dimanche 22 septembre 2019

Why I have invalid synax error with if else in python?

I have a problem with inbalid syntax on else when I want to run this script. I tried to move this part to left or right site, deleting a few fragment, but nothing help. Can someone tell me what I am doing wrong? please.enter image description here

n=int(input())
for b in range(n):
    for a in range(n):
        if (b+1)>=10:
            print(str(int((b%10))*(a+1))
        else:
            print(str(b+1)*(a+1))


Aucun commentaire:

Enregistrer un commentaire