Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Neat Arithmetic variables. Make sure you . Print a series of informative stateme

ID: 3747258 • Letter: N

Question

Neat Arithmetic variables. Make sure you . Print a series of informative statements, such as The result of the calculation S+7 is 12. Store the results of at least 5 different calculations in separate use each operation at least once Neat Order of Operations .Take your work for "Order of Operations" above . Instead of just printing the results, print an informative summary of the results. Shovw each calculation that is being done and the result of that calculation. Explain how you modified the result using parentheses Long Decimals Pattern On paper, 0.1-0.2-0.3. But you have seen that in Python, 0.1+0.2-030000000000000004 Find a mumber of other calculations that result in a long decimal like this. Try to find a patern in what kinds of numbers wil result in long decimals

Explanation / Answer

##1
a = 5
b=2
c= a+b
print ("The sum of ",a," and", b," is" ,c)
##2
m =21
n=7
d= m/n
print(m," when divided by", n ,"is",d )
##3
f=(21+3)*8
print("The value of f is",f)
##4
k=(23-8)*27
print("Difference between 23 and 8 is",k)  

##5
p=9
q=27
r=9  
s = (p+q)/r
print(p,"and", q," when added together followed by division of ",r,"is",s)


##second part
##explanation of result
##5 explanation
p=9
q=27
r=9
s=(p+q)/r
print("According to Bodmas rule the operation inside brackets comes before division.")  
print("Going by the rule when ",p,"sums",q,"its results in" ,p+q)
print("Then division operation takes preference,so when",p+q,"is diveded by", r,"its results in",(p+q)/r)


##4 explanation

k=(23-8)*27
print("According to Bodmas rule the operation inside brackets comes before multiplication.")  
print("Going by the rule when ",23,"minus",8,"its results in" ,23-8)
print("Then multiplication operation takes preference,so when",23-8,"is multiplied by", 27,"its results in",(23-8)*27)


##3
f=(21+3)*8
print("According to Bodmas rule the operation inside brackets comes before multiplication.")  
print("Going by the rule when ",21,"plus",3,"its results in" ,21+3)
print("Then multiplication operation takes preference,so when",21+3,"is multiplied by", 8,"its results in",(21+3)*8)


##2
m =21
n=7
d= m/n
print("there are no parenthesis the division operation takes place and the answer of d is",(m/n))

##1
a = 5
b=2
c= a+b
print("there are no parenthesis the division operation takes place and the answer of c is",(a+b))

###3rd Part

##adding of two decimal values result in such long decimal field
d=0.5/0.233 #division of numbers also gives long decimals
print(d)

d1=.6-.2 ##subraction of numbers also gives long decimal
print(d1)

f1 = 0.2*0.9##multiplication of two numbers gives long decimal
print(f1)


## Firstly for long decimal to occur the two numbers on which operations to be performed must be float numbers
#Since computer program stores the result of variable in binary form. One thing which can be clearly seen is when
## and num/10,where num is even is added subracted or divided is with number which is odd and the number envolved
## is dividable of 0.2 such pattern can occur.It explains in number which are less than one.

##lets take some examples of number greater than 1.If the output is recurring in set of 2/3 after
##decimal point such scenerio can occur.
f2=210/88
print(f2)

##however even with non recurring answer for every output if we continue to get decimal point upto 16
##possible digits,we can get long decimal
print(210.35*87.3722222)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote