Question: Entering the following arithmetic expressions using only a single operator in each case. Note the response from the interpreter in each case and describe the

Entering the following arithmetic expressions using only a single operator in each case.
Note the response from the interpreter in each case and describe the answers and what you
understand from it.(To describe the answers, you can use comments in code or alternatively
use 'print' Python statement to display your answer). Pay attention to the variables provided.
Create a variable "a" and initialise it to a value 7.
Create a variable "b" and initialise it to a value 3.
Create variable "c" and initialise it to a value 3.0
Create variable "d" and initialise it to a value 2.5
Create variable "e" and initialise it to a value 5.2
Save the result of the following operations in a variable (name it as per your choice)
i. Add "a" to "b"(For example, result1=a+b shows addition).
ii. Add "a" and "c"((Note the difference from the previous line (i)).
iii. Subtract "e" from "d".
iv. Multiply "b" by "a".
v."a" Floor Divided by "b"
vi."a" Divide by "c"
vii. "a" Modulo "b"
viii. "a" squared
ix."a" raised to the power "b".
Print the results of all operations on the variables
 Entering the following arithmetic expressions using only a single operator in

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 Databases Questions!