I have a simple piece of code that prints out the integers 1-10:
i = 0
while i < 10:
i += 1
print(i)
Then if you just change one operator around on line 3, it prints out an infinite amount of 1 integers (which I understand why it does that).
Why isn't a syntax error occurring when running this second program? Wouldn't it call a syntax error in the event of an assignment operator being followed by an addition operator?
i = 0
while i < 10:
i =+ 1
print(i)
Duplicate's noun and adjective forms are related—a duplicate is an exact copy of something, and as an adjective, duplicate refers to the quality of being an exact copy.
What is a Duplicate? The word duplicate is often used in the sense of 'an identical copy. ' To make a duplicate, you usually need the original.
Duplicate (Ctrl-D) will automatically copy and paste whatever slide you select and place it right below the original slide. It will be identical in every way to the previous slide. Copy, (Ctrl-C) will save a copy of the slide to your clipboard so that it can be pasted (Ctrl-V) elsewhere in the presentation.
Duplicate is almost the same as Copy, except that the copy is created in the same location as the original and assigned a new name. To do this, choose the Duplicate command (Command-D) from the Finder's File menu. The copy will have the word copy appended to its name.
i+=1
is the same as i=i+1
, whereas
i=+1
just means i=(+1)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With