Answer:
# Code in Python
dictionary={'A':1,'B':2,'C':3,'D':4}
other_dictionary={}
for keys in dictionary:
if dictionary[keys]&1==1:
temp=dictionary[keys]*dictionary[keys]-10*10
other_dictionary[keys]=temp
else:
other_dictionary[keys]=dictionary[keys]
print(other_dictionary)
assert other_dictionary
Explanation:
- Initialize a sample example dictionary and other_dictionary.
- Do a binary comparision for checking odd number
.
- Update the the value stored in the dictionary to store the squared difference of the original value and '10'.
- For even: store the original value (from dictionary).
Answer:
The program to this question can be given as:
Program:
public class Main //define class.
{
public static void main(String[] as) //define main method.
{
int n=5; //define variable n and assign positive value.
int i,j; //define variable
for (i = 7; i>=1; i--) //outer loop.
{
for (j = 0; j< i; j++) //inner loop.
{
System.out.print("*"); //print asterisks.
}
System.out.println(); //line break.
}
}
}
Output:
*****
****
***
**
*
Explanation:
The description of the above code can be given as:
- In the above java programming code firstly we define a class that is "Main". In this class we define a main method in the main method we define a variables that is "n" in this variable we assign a positive value. The we define another integer variable that is i,j this variable is used in the loop.
- Then we define a loop. for prints asterisks values in reverse triangle, we nested looping concept. In nested looping, we use in loop in this loop we use the i and j variables that print the asterisks value.
Explanation:
you need a better pic if possible, it's kinda hard to read the question.
Answer:
The client
Explanation:
On a client/server network, THE CLIENT computer initiates the process of assigning an IP address through DHCP. This is because "The Client" computer will serve as the Domain controller in which other computers of the network can find. Hence, The Client computer initiates the process of assigning IP addresses through DHCP to achieve this.
Though, in some case. A user can manually assign the IP address to computer if it is not through DHCP