Question: Disclaimer if coding is needed: THIS IS A PSEUDO CODE CLASS Algorithm Workbench 1 . As shown in this chapter, write a pseudocode statement that

Disclaimer if coding is needed: THIS IS A PSEUDO CODE CLASS Algorithm Workbench
1. As shown in this chapter, write a pseudocode statement that generates a random number in the range of 1 through 100 and assigns it to a variable named rand.
2. The following pseudocode statement calls a function named half, which returns a value that is half that of the argument. (Assume both the result and number variables are .) Write pseudocode for the function.
Set result \(=\) half(number)
3. A pseudocode program contains the following function definition:
Function Integer cube(Integer num)
Return num * num * num
End Function
Write a statement that passes the value 4 to this function and assigns its return value to the variable result.
4. Design a pseudocode function named timesTen that accepts an Integer argument. When the function is called, it should return the value of its argument multiplied times 10.
5. Design a pseudocode function named getFirstName that asks the user to enter his or her first name, and returns it.
6. Assume that a program has two string variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable.
Disclaimer if coding is needed: THIS IS A PSEUDO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!