Answer:
Both modules can generate random numbers.
Explanation:
Both the random and secrete modules are builtin programming modules used for generating random number variables. The random module consists of a number of methods in its module for random. number generation such as seed() ; getstate() ; random() ; choice() ; randrange() ; randint() and so on. Random methids are best for generating random numbers which are to be adopted for simulation or modeling. The secrete modules does the same however, numbers generated are stronger and less predictable than the random number modules. Secrete modules are usually adopted in the generation of authentication token and security pins.
Answer:
if, then, else
Explanation:
you specified that if you enter award for 1st prize then it'll display 1st prize but you didnt specify what will happen if user does not enter 1st prize or what happens if 1st prize is not allocated. To me it looks like you got the 'if' and 'then' part correct but you dont have a 'else' part to it therefore it'll create an error when its not declared.
Well 1234 for the first one
Answer:
Check the explanation
Explanation:
kindly check the well written code below to get the solution to your question.
import json
def json_filter(input_string):
jsonFormat = json.loads(input_string)
result = []
for obj in jsonFormat:
if obj["temperature"] > 38.46:
result.append(obj)
return json.dumps(result)