By means of examples, explain what programming environments and users environments refer to.
Produce the equivalent 'for loop for the while loop. Make use of pseudo code to formulate
Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop along with the equivalent while loop and for loop. Finally give an example of a for loop along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure and describe those disadvantages and advantages.
The volume of a sphere is 4/3πr3, where π has the value of "pi" given in Section 2.1 of your textbook. Write a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.
Call your print_volume function three times with different values for radius.
Include all of the following in your Learning Journal:
The code for your print_volume function.
The inputs and outputs to three calls of your print_volume.
edhesive 9.6 code practice:
4x5 grid array called n
n=[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]
and use a def printIt: and change n to [1,1,1,1,1],[2,2,2,2,2],[3,3,3,3,3],[4,4,4,4,4]
Read the following scenario, then answer the question that follows:
“To help students determine whether they qualify for a supplementary exam, students can enter their final module mark and exam mark on a webpage. If the student obtained more than 30% for their exam mark and a final mark of less than 50%, the student will be informed that he/she qualifies for a supplementary exam.”
Question:
Write the pseudocode that will prompt a user for the required information and accurately represent the logic contained in the scenario provided at the beginning of the question.
Consider the following snippets of code. Then, identify and describe the sorting algorithm used.
num scores[5] = 90,85,65,95,75
sort()
x = 1
while x < SIZE
temp = scores[x]
y = x – 1
while y >= 0 AND scores[y]>temp
scores[y+1] = scores[y]
y = y – 1
endwhile
scores[y+1] = temp
x = x + 1
endwhile return
Write the pseudocode for a program that will continue prompting a user for a value whilst the total of all values remain less than 100. The program must keep track of the number of times the loop executes and display the number of times the loop executed once the loop had finished executing.
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot