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

Please, need help.for python question 4.What is the term for a variable declared

ID: 639148 • Letter: P

Question

Please, need help.for python question

4.What is the term for a variable declared within a function? How is this different than a variable declared outside of any function?

6.What will be printed by the following code? printGreater(23, 6.1)

7.What will be printed by the following code?
     printGreater('23', '6.1')

8.What will be printed by the following code?
     printGreater(2*3, 2+3)

9.What will be printed by the following code?
   printGreater(3/2, 0.25*6)

10. Define a function named printPlus that takes two arguments, a and b, and prints out a line. Here are some examples. In these examples, the symbol ->indicates the text that will be output as a line.
   printPlus(3, 4) -> 3+4 = 7
   printPlus(1.5, 4) -> 1.5+4 = 5.5
   printPlus('sp', 'am') -> sp+am = spam

Explanation / Answer

- subtraction int float

% remainder int ,float ,

* multiplication int ,float

/ division int , float

// intgral division int

= assignment int float,string

rightAngle = 3.14* 1/2;

4)variable declared inside a function is only accessible to that function only other function cann't access this variable while a variable declared outside the function is accessible by all the functions

6) 23

7)6.1

8)6

9)0.5

10)def printPlus(a,b):
c=a+b;
print(" ",a," + ","",b," = " , "",c);
return;