answersLogoWhite

0


Best Answer

There are different ways of writing a pseudocode statement but the concept remains, it can be presented:

/*Declare variables

Total (number (3)) = 0

A (number (2)) =10

B (number (2)) =14

begin

Total=A+B

end

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a pseudocode statement that assigns the value 27 to the variable count?

count := 27


Write a pseudocode statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable totalfee?

set totalfee = subtotal * 0.15


Write a pseudocode statement that declares the variable cost so it can hold real numbers?

floating-point variable cost


Write a statement which assigns A to B?

B = A.


Write a pseudocode statement that declares the variable total so it can hold integers Initialize the variable with the value 0?

Declare Real price=49.95 Display "the original price." Input item original price Display "price"


How do you write an independent variable statement?

With your head, pen and paper or on your computer


Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10?

Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. The following pseudocode contains several nested If-Then-Else statements. Unfortunately, it was written without proper alignment and indentation. Rewrite the code and use the proper conventions of alignment and indentation. If score < 60 Then Display "Your grade is F." Else If score < 70 Then Display "Your grade is D." Else If score < 80 Then Display "Your grade is C." Else If score < 90 Then Display "Your grade is B." Else Display "Your grade is A." Design nested decision structures that perform the following: If amount1 is greater than 10 and amount2 is less than 100, display the greater of amount1 and amount2. Rewrite the following If-Then-Else If statement as a Select Case statement. If selection == 1 Then Display "You selected A." Else If selection == 2 Then Display "You selected 2." Else If selection == 3 Then Display "You selected 3." Else If selection == 4 Then Display "You selected 4." Else Display "Not good with numbers, eh?" End If Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that displays “Speed is normal” if the speed variable is within the range of 24 to 56. If speed holds a value outside this range, display “Speed is abnormal.” Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that determines whether the points variable is outside the range of 9 to 51. If the variable holds a value outside this range it should display “Invalid points.” Otherwise, it should display “Valid points.” Design a case structure that tests the month variable and does the following: If the month variable is set to 1, it displays “January has 31 days.” If the month variable is set to 2, it displays “February has 28 days.” If the month variable is set to 3, it displays “March has 31 days.” If the month variable is set to anything else, it displays “Invalid selection.” Write an If-Then statement that sets the variable hours to 10 when the flag variable minimum is set. End If End If End If End If


How do you design an If-Then statement or a flowchart with a single alternative decision structure that assigns 20 to the variable y and 40 to the variable z if the variable x is greater than 100?

Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. The following pseudocode contains several nested If-Then-Else statements. Unfortunately, it was written without proper alignment and indentation. Rewrite the code and use the proper conventions of alignment and indentation. If score < 60 Then Display "Your grade is F." Else If score < 70 Then Display "Your grade is D." Else If score < 80 Then Display "Your grade is C." Else If score < 90 Then Display "Your grade is B." Else Display "Your grade is A." Design nested decision structures that perform the following: If amount1 is greater than 10 and amount2 is less than 100, display the greater of amount1 and amount2. Rewrite the following If-Then-Else If statement as a Select Case statement. If selection == 1 Then Display "You selected A." Else If selection == 2 Then Display "You selected 2." Else If selection == 3 Then Display "You selected 3." Else If selection == 4 Then Display "You selected 4." Else Display "Not good with numbers, eh?" End If Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that displays “Speed is normal” if the speed variable is within the range of 24 to 56. If speed holds a value outside this range, display “Speed is abnormal.” Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that determines whether the points variable is outside the range of 9 to 51. If the variable holds a value outside this range it should display “Invalid points.” Otherwise, it should display “Valid points.” Design a case structure that tests the month variable and does the following: If the month variable is set to 1, it displays “January has 31 days.” If the month variable is set to 2, it displays “February has 28 days.” If the month variable is set to 3, it displays “March has 31 days.” If the month variable is set to anything else, it displays “Invalid selection.” Write an If-Then statement that sets the variable hours to 10 when the flag variable minimum is set. End If End If End If End If


Examine the following pseudocode module header and then write a statement that calls the module passing 12 as an argument?

def main(): showvalue() def showvalue(): print '12' main()


write a pseudocode to accept a number and find if it is prime or not?

Yes


What does an IVCDV chart mean?

Helps students organize identify independent variable, dependent variable, and constants in an experimental design. This information is then used to write an if/then statement for a hypothesis.


How do you write a pseudocode with conditions?

Start Input x, y ; If (x