Question: Q 1 : In the code , there are some integers and floats declared. Print the following in order: The sum of the values (

Q1: In the code , there are some integers and floats declared. Print the following in order:
The sum of the values (addition)
0 minus the sum of the values
The product of the values (multiplication)
The sum of the values divided by the product of the values Hint: You are free to declare additional variables if it's helpful.
In []:
a, b, c =2,2,0.5
Q2: You are given three variables, a, b, and c. Print the following numbers in order:
The product of a and b, floor divided by c
The remainder of the product of a and b divided by c
The result of raising a to the power of b.
The result of raising b to the power of c.
In []:
a, b, c =2,8,5
Q3: In the code there is a variable called number. Use the shorthand operators to:
Add 5 to number and print the result.
Subtract 2 from number and print the result.
Add number to itself and print the result. (Yes, you can add a variable to itself.)
In []:
number =0
Q4: In the code, there are 4 variables, a, b, c, and d. Print the following:
The logic OR of a and b.
The logic OR of b and c.
The logic OR of c and d.
The logic OR of a, b, c, and d.
In []:
a, b, c, d = False, False, True, True
Q5: In the code, there are 4 variables, a, b, c, and d. Print the following:
The logical AND of a and b.
The logical AND of b and c.
The logical AND of c and d.
The logical AND of a, b, c, and d.
In []:
a, b, c, d = False, False, True, True
Q6: In the code, there are 3 variables, a, b, and c. Print the following:
The negation of a.
The negation of c.
The negation of the logical AND of a and b.
The negation of the logical OR of b and c.
In []:
a, b, c = False, False, True

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!