Current time: 18 Apr 2024, 08:21 PM



need help
Offline Master

Registered User
Registered
11 Years of Service
Posts: 225
Threads: 124
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Feb 2013
Reputation: 0
Bronze Medal
#1
need help

i need some help i kind of dont understand i just need some more explanation there are 14 questions but i just need some more explanation

Assume that the following variables contain the values shown:

numberBig = 300

numberMedium = 100

numberSmall = 5

wordBig = "Elephant"

wordMedium = "Horse"

wordSmall = "bug"

For each of the pseudocode Boolean expressions decide whether the statement is true, false, or illegal.

the first one and second one is

1. numberBig = numberSmall
a True
b False
c Illegal
d No answer text provided.

2. numberMedium <= numberBig / 3
a True
b False
c Illegal
d No answer text provided.

the first and second one should be b or d but there is no evidence to back up on wht the statement is asking i dont really know need help

thanks


02 Mar 2016, 12:20 AM
Find Reply
Offline SmG Unreal

Senior Member
Senior Member
******
11 Years of Service
Posts: 1,118
Threads: 45
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Nov 2012
Reputation: 26
Location: Atlanta
Discord: Savage™#1505
OverwatchLegendary
#2
Re: need help

What do you mean by illegal?
[Image: d18134bafb2b0e1894ffc3a64e55355a.png]

02 Mar 2016, 12:22 AM
Find Reply
Offline Master

Registered User
Registered
11 Years of Service
Posts: 225
Threads: 124
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Feb 2013
Reputation: 0
Bronze Medal
#3
Re: need help

i dont know that what it says

its for pseudo code practice


02 Mar 2016, 12:26 AM
Find Reply
Offline Leaf

Registered User
Registered
11 Years of Service
Posts: 397
Threads: 24
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Jun 2012
Reputation: 0
Programmer
#4
Re: need help

Number 2 is true, if number 1 is asking if they're equal (==) then that would be false but if it's an assignment (=) then it's an illegal Boolean expression. It's pseudo code so Im not sure tho.
02 Mar 2016, 02:10 AM
Find Reply
Away Sorrow

Registered User
Registered
12 Years of Service
Posts: 437
Threads: 58
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: May 2011
Reputation: 0
#5
Re: need help

The first one is Illegal, assuming that its a comparison, the syntax is incorrect, the second one is True.

Take for example the IF condition on the following image which is comparing the node.lowlink with the node.index as if node.lowlink == node.index.
[Image: JW05t.png]
Give a man a mask, and he will reveal his true self.
02 Mar 2016, 10:26 AM
Find Reply
Offline Reaper

Registered User
Registered
8 Years of Service
Posts: 422
Threads: 27
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Aug 2015
Reputation: 0
#6
Re: need help

That's easy I think
02 Mar 2016, 04:19 PM
Find Reply
Offline Kite

Zemox's maid
Donator
******
8 Years of Service
Posts: 2,018
Threads: 55
Likes Received: 3 in 3 posts
Likes Given: 0
Joined: Jan 2016
Reputation: 176
Location: V9
Discord: Kite
Bronze MedalThanks From CloudGeniusDiscord WarriorJokerSilver Medal
HalloweenChristmas 2018Emerald DonatorBronyHalo GodHalloween 2019
Crystal Donator
#7
Re: need help

Tbh i'm pretty sure both are false because for number 2. you have numbermedium <= Number big /3
since its psuedocode i would assume all u would do is sub in values to check correctness ( i did something like this in class the other day) so it would be 100 <= 300/3 which is basically 100 <= 100 which is false......if u get what i'm saying

P.s I could be wrong but thats what i did for minez and got it right
02 Mar 2016, 06:08 PM
Find Reply
Offline Leaf

Registered User
Registered
11 Years of Service
Posts: 397
Threads: 24
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Jun 2012
Reputation: 0
Programmer
#8
Re: need help

100<=100 is true... (100=100)
03 Mar 2016, 11:37 PM
Find Reply
Offline SmG Hawk

Senior Member
Senior Member
******
12 Years of Service
Posts: 4,057
Threads: 287
Likes Received: 2 in 2 posts
Likes Given: 0
Joined: Jul 2011
Reputation: 58
Location: Gaytown
The BombBronze MedalLegendary
#9
Re: need help

SmG Kite Wrote:100 <= 100

<= Less than OR equal to. Therefore it would be true.
[Image: xYk6UVx.png]
10 Mar 2016, 11:22 PM
Find Reply
Offline Alloy

Registered User
Registered
12 Years of Service
Posts: 4,954
Threads: 232
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Sep 2011
Reputation: 22
5K
#10
Re: need help

Aight, coming from a guy whose about to take Real Analysis next term I confirm that 100 <= 100 is true.

Now, let me rethink my life and try to figure out why i didn't use ratemyprofessor before I registered the class.
11 Mar 2016, 02:57 AM
Find Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
SmG Gaming, © 2010-2024
Theme By: «SmG» Cloud
Edited by: «SmG» Wires