It's about the combination of Python if and for statements.
v = false
for i in range (5):
for j in range (5):
if v is false:
print ("✳︎", end ＝＝ "")
v = true
print ("-", end = "")
v = false
I want you to explain this in an easy-to-understand manner!
In particular, I don't know the relationship between i, j and ✳︎,-and why they alternate.
Answer # 1
It ’s faster to actually see it.
After opening the link destination and waiting for a while, the following screen appears.How to write code
You can proceed with one-step processing with the "Forward" button.
StackOverflow has a function that makes it easy to see the code.
Open the question edit screen and press the<code>button with the code selected.
Especially in Python, if the indentation breaks, the meaning of the code changes.
Also, when presenting code, make sure that it works correctly.
The code presented is full of bugs.
- how to use for in python
- python - read a text file and write to another text file
- about csv duplication detection (python, for statement)
- python 3x - if x is 3 or less, it is x, and if x is 4 or more, we want x=4
- php - how to use for and while
- python for statement
- python - i want to do the same for all csv files in a folder
- i can't import cv2 and os in python
- python - reason for adding alp of alp = alp + i
- python - i can't putitem for dynamodb
- python - [django] i can't log in for some reason
- read csv with python and output new
- python - i want to use the values defined in other def statements in other def statements
- python - i want to delete """ and "\" added to json data
- tell me about python iteration statements
- python - i have a question for data scientists
- python 3x - get date for specific day of week in python
- python - comparing arrays of repeated statements
- [python3] i wrote a program to classify points, but an error occurred in the program that displays the number of people outside
- i want to create a multiplication table in python!
- python - i want to make a code that returns true when the text is output by the print function in the if function, and false whe
- i want to output the results one by one with a python for statement
- i can't successfully store the data scraped by selenium using python in the list
- python else doesn't work
- python - i want to divide the scores of 10 people's tests
- python list
- python - i want to dynamically change the label on the tkinter gui by processing the for loop
- about repeated operations in python for statement