Answer:
Exponential
Explanation:
The growth of an exponential function will develop much faster than all other functions included in the options meaning the execution time will take longer. This makes exponential functions the least efficient.
Answer:
The result of the following code will be 9
Explanation:
There are several operators used in Python to do mathematical calculations.
** operator is used for exponents.
i.e.
a ** b mathematically means a^b
Here in the given code
3 is assigned to numA and 2 is assigned to numB
Result will be equal to 3^2
Hence,
The result of the following code will be 9
Answer:
1.) 25 ; 15 ; 15
2.) 50 ; 15 ; 50
Explanation:
In the first function written :
The variable val was initially decaled or assigned a value of 25 and that was what was printed first.
However, after the example function was written, the val variable was finally assiagned a value of 15 within the function. However, it was also declared that the global variable takes uonthe val value. Hence, the val variable initially assigned a value, of 25 changes to 15 globally.
For the second code :
From the top:
Val was assigned a value of 50 ;
Hence,
print(val) gives an output of 50
Within the function definition which prints the value of val that is assigned a value of 25 within the function.
Since tbe global variable isnt reset.
Printing Val again outputs 50;since ito is outside the function.
Sorry the website wasn’t working for me
Answer:
There is no difference between ‘’ and “” string type in python. Both are used to hold the string or sequence of character in the python. triple """ """ can also use for the same.
Example:
str1 = "aeiou"
str2 = 'aeiou'
str3 =""" hello"""
print(type(str1), type(str2),type(str3))
<class 'str'> <class 'str'> <class 'str'>
Here all are used to hold string or sequence of character.