You are viewing a single comment's thread from:

RE: Basic programming course: Lesson #3 Operations [ESP-ENG]

in #devwithseven2 months ago (edited)

Hi @alejos7ven!

Make a program that asks the user for 2 numbers and evaluates if both numbers are the same.

Should I add any conditions to check the entered numbers are equal or not? Or just I need to get the input from the user and to display it on the screen and explain by myself in the description of the program in the post that the numbers are equal or not.

Evaluate if the results of the 3 operations are greater than or equal to 0 (>=) and show it on the screen.

I am confuse in this question what actually you are wanting. Should I write a separate program for each expression to get the expression result and then apply the check condition on that result if it is greater than or equal to (>=0).

Or should I calculate the expressions without writing code and determine if the result is >=0

I am hoping your response on these questions.

Sort:  

Hi!

Should I add any conditions to check the entered numbers are equal or not? Or just I need to get the input from the user and to display it on the screen and explain by myself in the description of the program in the post that the numbers are equal or not.

Let the user set both numbers and use a Boolean (logic) variable to compare them. Then show a message like "Are the numbers the same?" And show the Boolean value (true/false)

I am confuse in this question what actually you are wanting. Should I write a separate program for each expression to get the expression result and then apply the check condition on that result if it is greater than or equal to (>=0).

No, do a very single program where you add the three operations and then evaluate the theee results at the same time, something like

are_greater_zero= (x>=0 and z>=0 and y>=0);

Then show the bool on the screen.

If you still have doubts don’t hesitate to ask!

PD: Don’t use conditionals for this lesson

Thank you so much for the clarification. It is highly appreciated.

Thank you boss for always be very attentive to guide others.

UMMER(2).jpgTeam True Colours - @aaliarubab