Answer:
def mapper( a, b ):
return dict(zip(a,b))
def map2 ( f, x : list, y: list ) ->dictionary:
mapped_lists = f( x, y )
new_list = [ ]
for key, value in mapped_lists.iteritems():
items = [key,value]
new_list.append(items)
return new_list
result = map2( mapper, x, y )
print( result )
Explanation:
The "map2" python function defined above maps two lists of the same length. It receives two iterators or lists and a function and returns a list of mapped items from both lists.
import math as m
def print_word(N, W, retries = 4):
for _ in retries:
if(N > 100 or N < 0 or len(W) > 50):
print("Number is out of range or word is too large. Try again.")
new_word = str(input("New word: "))
new_num = int(input("New number: "))
if(new_num >= 0 and new_num <= 100 and len(W) <= 50):
for row in new_num:
print(new_word)
return "Thank you for your time!"
if(N >= 0 and N <= 100 and len(W) <= 50):
for row in N:
print(W)
return "Thank you for your time!"
try:
N = m.floor(int(input("Enter a number from 0 to 100: " )))
W = str(input("Enter a word: "))
except ValueError:
print("Invalid Input!")
print(print_word(N,W))
Answer and Explanation:
import Circle
#include<conio.h>
void main ()
int t , length , n
//for hexagon
def hexagon(t, length, n):
for _ in range(n):
t.fd(length)
t.lt(360 / n)
square = Circle.Circle()
square.penup()
square.sety(-270)
square.pendown()
hexagon(square, 30, 60)
Answer:
Search Engine
Explanation:
A search engine refers to a computer application software that looks through and locates items in a database. These items will correspond to to the phrases or keywords being searched for that has been entered by a user.
On the internet or web, popular search engines are provided by google and yahoo and they are designed to carryout web search when users enter search query as keywords or phrases
Hey!
Pro: Easier access to necessary information
Con: It could be a scam.
Hope I helped! Have a gr8 day! :)