Answer:
A AND B= 1 or 0
1 1 1
0 1 0
1 0 0
0 0 0
So, as explained above if both are 1 we then only get 1, or else we get 0 always in case of AND which is a logical operator, whose output can be 0 or 1 only. This is being depicted above.
Explanation:
If both are 1 we get 1 or always else, we get the output =0.
D cause you will need to keep up with data also
Potential uploaded viruses, personal information being lost, blackmail, identity theft.
Answer:
The program to this question can be given as:
Program:
def swap_values(user_val1, user_val2): #define function
return (user_val2, user_val1) #return values
if __name__ == '__main__': #define constructor.
n1 = int(input('Enter first number :')) #input value form user
n2 = int(input('Enter second number :')) #input value form user
(n1,n2) = swap_values(n1,n2) #hold function values.
print(n1) #print values
print(n2) #print values
Output:
Enter first number :3
Enter second number :8
8
3
Explanation:
The explanation of the above python program can be given as:
- In the python program we define a function that is "swap_values". This function takes two integer values that is "user_val1 and user_val2" as a parameters and returns variable values that is "user_val2 and user_val1".
- Then we use a constructor in this we define two variable that is "n1 and n2" these variable are use to take user-input from the user and pass the value into the function.
- To hold the value of the function we use n1 and n2 variable and print these variable value.
Answer:
Try :
Semester_Fee = 8000.0
for x in range(1, 6):
import decimal
Semester_Fee = Semester_Fee + Semester_Fee *(3/(100*1.0))
if x==1:
print("In",x,"year, the tuition will be" ,'$', Semester_Fee, end='.')
else:
print("In",x,"years, the tuition will be" ,'$', Semester_Fee, end='.')