Question

In: Computer Science

1 Write structured pseudocode to show the following: If you are at home, get comfortable and...

1 Write structured pseudocode to show the following: If you are at home, get comfortable and take a nap while you are sleepy, otherwise do not take a nap. 2 Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee 3 Write structured pseudocode to indicate that you will keep drying your hair while it is still wet 4 Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee

Solutions

Expert Solution

Answer: Hey! Dear Student, Kindly find your solution here. If you have any queries, feel free to ask me. Thanks.

function main()

    output "Enter position at home/at work"

    input position

    if position = "Home" then

        output "Are you feeling comfort?Y/N"

        input feelComfort

        if feelComfort = "Y" then

            output "Are you feeling sleepy?Y/N"

            input sleepy

            if sleepy = "Y" then

                output "Take a nap"

            else

                output "Don't take a nap"

            end If

        else

            output "Hair is wet.So I'll keep drying my hair"

        end If

    else

        output "It's time to buy a coffee"

    end If

end function


Related Solutions

1. Draw a structured flowchart or write structured pseudocode describing how to get from your home...
1. Draw a structured flowchart or write structured pseudocode describing how to get from your home to your school. Include at least two decisions and two loops. 2. Draw a structured flowchart and write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The process continues until the player guesses the correct number. Pick a number and have a fellow...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The process continues until the player guesses the correct number. Pick a number and have someone try to guess it by following your instructions. Submit the flowchart or pseudocode and the results of your test. Create a python program based on your flowchart or pseudocode....
i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing...
i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing the steps you would take to bake pancakes in a pan.  Include at least one decision. 2.       2.  Create the pseudocode to go along with the flowchart created in question above.
1. Write pseudocode for the following program. You do not have to write actual C++ code....
1. Write pseudocode for the following program. You do not have to write actual C++ code. Assume you have a text file, that has been encrypted by adding 10 to the ASCII value of each character in the message. Design a decryption program that would reverse this process, and display the original message to the console.to the new array. 2.Write the code for the specified program. Use proper style and naming. Test and upload your code as a CPP file....
write pseudocode for the following problems not c code Pseudocode only Write a C program to...
write pseudocode for the following problems not c code Pseudocode only Write a C program to print all natural numbers from 1 to n. - using while loop Write a C program to print all natural numbers in reverse (from n to 1). - using while loop Write a C program to print all alphabets from a to z. - using while loop Write a C program to print all even numbers between 1 to 100. - using while loop...
READ THE FOLLOWING CAREFULLY TO GET FULL VALUE FROM THE PRACTICE. IF NOT COMFORTABLE WITH CLASSES,I...
READ THE FOLLOWING CAREFULLY TO GET FULL VALUE FROM THE PRACTICE. IF NOT COMFORTABLE WITH CLASSES,I WOULD START WITH DEFINING THE CLASS WITH ONE constructor AND GO FROM THEREUse the following to calculate a GPA (the following is for calculation information only):A = 4.00 grade points per credit hourA- = 3.70 grade points per credit hourB+ = 3.33 grade points per credit hourB = 3.00 grade points per credit hourB- = 2.70 grade points per credit hourC+ = 2.30 grade...
write the pseudocode and code to solve the following: you are given a list. determine the...
write the pseudocode and code to solve the following: you are given a list. determine the sum of all the elements in the list without using the built in puthon function sum(). Take your code and create your own function and name it my_sum_algo() which will return the sum of numbers PS please write comments in the code for my understanding, and please write jn jn PYTHON 3 languge. Thank you, have a great day !
For the following question, please show your work. Every number you get, show how you got...
For the following question, please show your work. Every number you get, show how you got it. And please make everything as clear as possible. Thanks in advance. 2. What is the outstanding balance on the following loan after the borrower has made 12.5 years of payments? (For full credit, calculate manually and show all of your work.) (20 pts) Loan amount: $300,000 Term: 25 years Discount Points: 5 Payments: Monthly Interest Rate: 4.5% (annual)
Write the Pseudocode for the following programming problem. Write a program that will calculate a tip...
Write the Pseudocode for the following programming problem. Write a program that will calculate a tip based on the meal price and a 6% tax on a meal price. The user will enter the meal price and the program will calculate tip, tax, and the total. The total is the meal price plus the tip plus the tax. Your program will then display the values of tip, tax, and total. The tip amounts based on the mean price are as...
Please I can get a flowchart and a pseudocode for this java code. Thank you //import...
Please I can get a flowchart and a pseudocode for this java code. Thank you //import the required classes import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class BirthdayReminder {       public static void main(String[] args) throws IOException {        // declare the required variables String sName = null; String names[] = new String[10]; String birthDates[] = new String[10]; int count = 0; boolean flag = false; // to read values from the console BufferedReader dataIn = new BufferedReader(new...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT