def func():
total = 0
while True:
pet = input("What pet do you have? ")
if pet == "rock":
return
total += 1
print("You have a {} with a total of {} pet(s)".format(pet, total))
func()
We wrapped our code in a function so that whenever the user enters rock, we can simply return and exit the function. If you have any other questions, I'll do my best to answer them.
The answer is cyclin subunit
Answer:
The Level 1 Monitor
Explanation:
From the given question, the Level 1 Monitor is the correct answer.
The Level 1 Monitor allows or permits emergency managers to study the social media medium and language used in order to better understand the workings of the service.
Answer:
Following are the step by step algorithms is explain below.
Explanation:
Following are the algorithm for searching shortest distances.
- Firstly, Initialize the array variable distance[] = {INF, INF, ….} as well as distance[s] = 0 in which the variable 's' is the beginning vertex
- Then, you have to develop a topological order of the following vertices.
- So, Do in the following for mostly vertex that is the variable 'u' in the topological order.
Do on the following for mostly contiguous vertex that is 'v' of 'u'
if (dist[v] > dist[u] + weight(u, v))
dist[v] = dist[u] + weight(u, v)
Answer:
a.
Explanation:
Based solely on the snippet of code provided on the question the main reason why the code won't compile (from the options provided) is that the setAverage() method can’t access the average instance variable. Since the average variable is an instance variable it means that it only exists inside the one of the functions and not to the entire class. Meaning that in this scenario it can only be accessed by the Student function and once that function finishes it no longer exists. Also, it is not one of the options but if these variables are instance variables as mentioned their type needs to be defined inside the function.