Loops

The questions below are due on Thursday June 17, 2021; 11:00:00 AM.
 
You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
For each of the programs below, simulate it by hand using an environment diagram to predict what value will be printed. If you run into issues, first try debugging by hand and then using print statements in Python.
Part 1
ids = [3, -5, 1]
i = 0

while i < len(ids):
	ids[i] = ids[-i]
	i += 1

print(ids)
What value is printed?
Part 2
word = "summer"
vowels = "aeiou"
out = ""

for char in word:
	if char in vowels:
		char = char.upper()
	out += char

print(word+out)
What value is printed?