Answer:
For the "Name" variable
name = "Hello, sunshine!"
total_unicode_sum = 0
for char in name:
total_unicode_sum += ord(char)
print(total_unicode_sum)
For the "movie" variable
movie = "The Lion King"
count = 0
for char in movie:
if char in 'aeiou' and char.islower():
count += 1
print(count)
[Note: With this code, a for loop is used to repeatedly traverse through each character in the movie string. If the character is a lowercase vowel, we utilize an if statement to determine whether to increase the count variable. In order to show the quantity of lowercase vowels in the movie title, we output the value of count.]
Bonus:
Here is combined code that would work as an executable.
name = "Hello, world!"
total_unicode_sum = 0
for char in name:
total_unicode_sum += ord(char)
print("The total Unicode sum of the characters in", name, "is:", total_unicode_sum)
movie = "The Lion King"
count = 0
for char in movie:
if char in 'aeiou' and char.islower():
count += 1
print("The number of lowercase vowels in", movie, "is:", count)
[Note: The for loop and ord() method are used in this code to first get the name string's overall Unicode sum. The complete Unicode sum and a message are then printed.
The code then used a for loop and an if statement to count the amount of lowercase vowels in the movie text. Following that, a message and the count are printed.
When you run this code, it will first show the name string's character count in total Unicode, followed by the movie string's number of lowercase vowels.]