Answer:
Correct code for the above question which is written after the defined list to display the output.
for x,y in country_pop.items(): #for loop to prints the list items.
print(str(x)+" has "+str(y)+" people") #print function to print the value.
Output:
- The above code is in python language which display the output as the above question demands.
Explanation:
- The above question code is written in python language to display the result, but this code is not correct.
- The above code needs a 'for' loop, which will render the list item one by one.
- The above-list defined in the form of key-value pair, So there is a need for the ''item" function which is the part of the python dictionary to display the list items.
- There also needs to define the two variables in the for loop, one is for key and the other is for value.
Answer:
(A) IF (IsFound
(afternoonList, child))
{
APPEND (lunchList, child)
}
Hope this helps!
Answer:
c. your friend can hash all possible options and discover your secret.
Explanation:
SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.
Answer:
The answer is "Option A and Option C".
Explanation:
In choice a, it is true since a client-server design can be used for REST-application. A user is somebody who needs space and it doesn't deal with storing data on a central computer. A client is someone with the money, and the interface does not. Its server doesn't want to worry regarding core functionality on the ends of the server. The server does not have to know anything at all about the layer of UI used at the end of the server.
In choice c, it is true As just a Web app, services like corporate/employee resources must be organized, and HTTP verbs like the GET, Place, POST, DELETE must be used to modify these. It must be obvious, as a programmer, that what is required is clearly to look only at the interface or HTTP method used.
Answer:
// here is code in c.
#include <stdio.h>
// main function
int main()
{
// variable to store year
int year;
printf("enter year:");
// read the year
scanf("%d",&year);
// if year>=2101
if(year>=2101)
{
printf("Distant future");
}
//if year in 2001-2100
else if(year>=2001&&year<=2100)
{
printf("21st century");
}
//if year in 19011-2000
else if(year>=1901&&year<=2000)
{
printf("20th century");
}
// if year<=1900
else if(year<=1900)
{
printf("Long ago");
}
return 0;
}
Explanation:
Read the year from user.After this, check if year is greater or equal to 2101 then print "Distant future".If year is in between 2001-2100 then print "21st century".If year is in between 1901-2000 then print "20th century".Else if year is less or equal to 1900 then print "Long ago".
Output:
enter year:2018
21st century