Answer:
The operation of 6*x only executes if x is greater or equal to 0, since x=-10 and -10 is less than 0, the operation does not execute. For this reason, the value of y using this code is None.
Explanation:
In python a function is defined with the syntaxis:
def function(x):
the operation to execute (x)
value to return
In this case, the function is foo and the parameter is x:
def foo(x):
if x>= 0:
return 6*x
The code starts by assigning a value to x. Then, the code asks if the value of x is grater or equal to 0, if this condition is meet, then the code returns the value of 6 times x, if not, then the code does not return a value. In this case, x is -10 and this value is not grater or equal to 0. Given that the condition is not met, then the code stops executing and the value of y is none.
Answer:
event based and time based
Explanation:
OTP tokens come in two types: event-based (HOTP) and time-based (TOTP). Event-based OTP tokens generate new codes at the press of the button and the code is valid until it is used by the application. Time-based OTP tokens generate codes that are valid only for a certain amount of time (eg, 30 or 60 seconds), after which a new code must be generated
Answer: <em><u> How to code for a database? A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques. </u></em>
WWW. Wikipedia.com
Explanation: When creating a database first you need to make a software program then you need to start planing on what to do ...
{ A database management program (DBMS) is a software package design designed to manipulate, define, retrieve, and manage data in database.
A DBMS generally manipulates the data itself, the the data format, field names, record structure and file structure.}
<h3><u><em>
HoPe ThIs HeLpS YoU!!</em></u></h3>
<u><em /></u>
Answer
calculator calc;
Explanation
An object is an instance of a class. And a class is what defines or describes the behavior or the state of the object of its type. When a class is defined no memory is allocated until when an object is created memory is allocated.
1.
name = input("Enter your name: ")
num1 = int(input("Hello "+name+ ", enter an integer: "))
num2 = int(input(name+", enter another integer: "))
try:
if num1 % num2 == 0:
print("The first number is divisible by the second number")
else:
print("The first number is not divisible by the second number")
except ZeroDivisionError:
print("The first number is not divisible by the second number")
try:
if num2 % num1 == 0:
print("The second number is divisible by the first number")
else:
print("The second number is not divisible by the first number")
except ZeroDivisionError:
print("The second number is not divisible by the first number")
2.
import random, math
num1 = float(input("Enter a small decimal number: "))
num2 = float(input("Enter a large decimal number: "))
r = round(random.uniform(num1, num2), 2)
print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))
I hope this helps!