update,
This commit is contained in:
27
max015/T11/P05 copy.py
Normal file
27
max015/T11/P05 copy.py
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
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)
|
Reference in New Issue
Block a user