3

this is kinda fun I guess

Comments
  • 3
    School needs some source control
  • 2
    'Zip your code'

    - eye starts twitching -

    Damn....
  • 0
    my noob self is just having a hard time figuring this out
  • 1
    100 MB? Must be taking in a video recording of how you code your solution
  • 1
    @cloudsxvx
    The hint is to take the "is Socrates" human exercise, and create a function for each proposition.

    You then combine them together to make an executable function that returns true or false for is Socrates human.
  • 0
    @SortOfTested that makes more sense than the way so basically just make a function that combines all of it to say true or false ?
  • 1
    @cloudsxvx
    Yeah, they want you to express the same logic in the previous exercise, but as executable logic.

    Basically take your pseudo code and make it real code.

    Don't forget to check whether the arguments are valid.
  • 0
    @SortOfTested thank you very much
  • 1
    @SortOfTested function testMortality(humansName){

    const humanName = ["socrates", "aristotle", "plato"];

    let gods=("zeus", "apolo", "hera", "poseidon");

    if (humansName === humanName) {

    console.log (humanName + " " + "is of man");

    } else {

    console.log( gods + " " + "is not of man");

    }

    }

    testMortality("zeus");

    does this meet the criteria? or am I way off. more over is there a hint I could have to make this better?
  • 2
    Oof, at least you have CS at the Moment.
    My teacher decided to become a father and Take a month Off.
  • 0
    @cloudsxvx
    The instructions say, it should also validate that the name supplied in the argument is a string, and return true or false.

    Move the console logs outside of the function and use them to test the true or false result.

    This is a fairly dumb setup for a question, imo. Syllogism is closer to set theory in practice than raw Boolean logic.
Add Comment