Final answer:
To display Pattern A and Pattern B using nested loops in Python, you can use the provided code. Run the code to see the output.
Step-by-step explanation:
Pattern A:
In order to display Pattern A using a nested loop, you can use the following Python code:
for i in range(1, 6):
for j in range(1, i+1):
print(j, end=' ')
print()
Pattern B:
To display Pattern B using a nested loop, you can use the following Python code:
for i in range(1, 6):
for j in range(1, 6-i+1):
print(j, end=' ')
print()
Screenshot for Pattern A:
Unfortunately, I cannot provide a screenshot in the text-based format, but you can copy and run the code to see the output.
Screenshot for Pattern B:
Similarly, you can run the code provided for Pattern B to see the output.