Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

Students also viewed these Databases questions