exam questions

Exam FC0-U61 All Questions

View all questions & answers for the FC0-U61 exam

Exam FC0-U61 topic 1 question 134 discussion

Actual exam question from CompTIA's FC0-U61
Question #: 134
Topic #: 1
[All FC0-U61 Questions]

Given the following pseudocode:

If there are seven apples in the basket, which of the following would be the number of oranges a person eats?

  • A. 10
  • B. 14
  • C. 15
  • D. 17
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JassuSingh
Highly Voted 2 years, 11 months ago
15 is right because the person eats 2 oranges 6 times which equals to 12 and then eats 3 oranges for the last apple which gives the grand total of 15.
upvoted 9 times
...
yanis88
Most Recent 9 months ago
Selected Answer: C
C. 15 Consider this simple python: apples = 7 # number of apples in the basket oranges = 0 # init the oranges # we loop through the 'basket' till one apple is left and then we break for item in range(apples, 1, -1): # loop through the basket with apples, range(start, stop, step) oranges += 2 oranges += 3 # add the last oranges for the last apple print(oranges) # that should give 15
upvoted 1 times
...
Idkhelpme
1 year, 2 months ago
6x2 + 1x3= 15
upvoted 2 times
...
Quallie
2 years, 8 months ago
It doesn’t say the apples are removed each time you eat the corresponding oranges, so the answer should be 14
upvoted 2 times
[Removed]
2 years ago
Nobody said anything about removing the apples, a "for each" cycle evaluates each object in sequence, you can point to each apple one by one without touching them. They can all stay together in the basket without risk of confusion. The answer is 15.
upvoted 2 times
...
...
CyberChic
2 years, 11 months ago
There are 7 apples in the basket. 7*2=14 not 15
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago