Answer:
The code for DOOR would be <u>3775</u>.
Explanation:
WORD - 9753
W - 9
O - 7
R - 5
D - 3
DOOR: 3775
Answer:
Please find the attachment of the code file and its output:
Explanation:
In the first code, two variable "a, b" is defined that holds dictionary value which is defined in the question, in the next step a for loop is declared that hold dictionary key and value and use a method set to check the value is available in the dictionary and use print method to print its value.
In the second code, a package counter is an import as the c for count value, in the next step a variable a is declared, that uses a counter method to hold a dictionary value in its parameter, and in the print method, it uses sort method to print its value.
1 prepare mentally
2 pay attention
3 allow the speaker to talk without interruption until he is done
4 provide feedback
5 repeat the feedback until you and the communicator are satisfied that the message was conveyed well
Answer:
Following is the program in the python language
hr = input("input hours:") #Read input by user
h1 = float(hr)
rate =input("Input Rate:") #Read RATE BY USER
r1 = float(rate) #CONVERT INTO FLOAT
if h1 <= 40: #check condition
t=h1 * r1
print (t) #DISPLAY
else :#else block
t1=(40 * r1) + (h1 -40) * r1 * 1.5
print('The pay is :')
print(t1)#DISPLAY
Output:
input hours:45
Input Rate:10.50
The pay is :
498.75
Explanation:
Following are the description of program
- Read the value of hour in the "hr" variable and convert into the float value in the "h1" variable .
- Read the value of rate in the " rate" variable and convert into the float value in the "r1" variable .
- After that check the condition of hour if block if the hour is less then or equal to 40 then it multiplied h1 *t1 otherwise else block will be executed and print the value of pay .