Answer:
Nothing will be printed
Explanation:
You can easily find out that FL is not a member of the Dictionary. And we are checking these in the if. Since the if condition ends up being false, the further process will not run as they will only if the condition ends up being true. Hence, nothing will be printed.
Remember, del is used to delete a dictionary item. If this would have been a true condition for if then the FL item in the dictionary would have been deleted as it, in that case, would have been present there. And then the next line would have again added the FL item, and print would have printed the dictionary items with FL item as well. However, since if the condition is ending up being false, nothing will be printed.
If cities['FL'] and print is outside if then
the output will be
{'FL': 'Tallahassee', 'GA': 'Atlanta', 'NY': 'Albany', 'CA': 'San Diego'}
Answer:
Determine the intensity of the magnetic field in the center of a thin coil with 20 turns. The current is 2A, the mean radius of the coil is 4cm.
Explanation:
to help english help you
Answer:
Following are the program in the Python Programming Language.
#declare variables and initialize to 0
s=0
n=0
avg=0
#set the infinite while loop
while(True):
#get input from the user
score=input()
#set if statement to break loop
if(score =="stop"):
break
#otherwise, perform calculation
else:
n+= 1
s=s+ int(score)
avg= s/n
#print average of the input
print ('average: ',avg)
<u>Output</u>:
58
96
34
15
stop
average: 50.75
Explanation:
<u>Following are the description of the program</u>.
- Firstly, set three variable that is 's' for sum, 'n' for count and 'avg' for average and initialize them to 0.
- Set the infinite while loop and inside it, set variable 'score' that get input from the user then, set the if conditional statement for break the loop, otherwise we calculate the sum of the user input and calculate its average.
- Finally, we print the result with message.
A.A shot.
hope this helps!!