Files
max015/T11/P05 copy.py
2025-02-01 02:04:08 +08:00

28 lines
398 B
Python

def myFunction(n):
if j % i == 0: # Check if j is divisible by i
for k in range(j):
s_i_loop += 1
print("*", end="") # Print '*' to the console without newline
print()
# Example usage
print("n=0")
myFunction(0)
print("n=1")
myFunction(1)
print("n=2")
myFunction(2)
print("n=3")
myFunction(3)
print("n=4")
myFunction(4)
print("n=5")
myFunction(5)