Answer:
Portrait orientation is taller then it is wide, while landscape orientation is wider then it is tall.
Explanation:
When creating an input/output table, where do you enter the formula?
A. In the input cell
B. In the output cell
C. In the title cell
D. In the table of contents
<u>ans. (B) In the output cell</u>
Answer:
Program :
def var_input():
#input function which takes the radius as input.
radius= float(input("Enter the radius of the sphere"))
#statemet to take the inputs.
volume(radius) /#call the volume function.
def volume(radius): #definition of volume function.
print("The volume of the sphere is :"+"{:.2f}".format((4/3)*(22/7)*radius*radius*radius)) # print the volume of the sphere.
var_input() # calling the input function.
Output:
- If the user inputs 4, then he will gets "268.19" as the output.
- If the user inputs 5, then he will gets "523.81" as the output.
Explanation:
- The above code is in python language, in which the first line is used to call the function.
- Then the first line of the input function is used to render the message to the user and take the inputs from the user and store it into the radius variable.
- Then the second line calls the volume function by passing the radius value.
- Then the volume function calculates the volume and prints it.
Answer:
Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".
Explanation:
The main issue with the first code segment is the way how the if else if condition are arranged. The "pea" is checked at the earliest time in the first code segment and therefore so long as there is the "pea" exist in the string (regardless there is pear or pearl exist in the string as well), the if condition will become true and display "pea" to terminal. This is the reason why the code segment 1 only work for the values of str that contain "pea".