exam questions

Exam PCEP-30-02 All Questions

View all questions & answers for the PCEP-30-02 exam

Exam PCEP-30-02 topic 7 question 14 discussion

Actual exam question from Python Institute's PCEP-30-02
Question #: 14
Topic #: 7
[All PCEP-30-02 Questions]

How much will the delivery cost be, if the order value is 1700 and the state is FL (Florida)?

  • A. 120
  • B. 105
  • C. 80
  • D. 90
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
Sam_sgv
1 week ago
Selected Answer: A
order = int(input('Please enter the order value: ')) state = input('Please enter the state (as postal abbreviation): ') delivery = 0 if state in ['NC', 'SC', 'VA']: if order <= 1000: delivery = 70 elif 1000 < order < 2000: delivery = 80 else: delivery = 90 else: delivery = 50 if state in ['GA', 'WV', 'FL']: if order > 1000: delivery += 30 if order < 2000 and state in ['WV', 'FL']: delivery += 40 else: delivery + 25 print (delivery)
upvoted 1 times
...
Sam_sgv
1 week ago
Selected Answer: A
The correct answer is A, if you try the code the output is 120. Billybob0604 got it wrong because he miss a '=' character for the +30 line.
upvoted 1 times
...
Billybob0604
2 months, 2 weeks ago
Selected Answer: D
The answer is D. Just try: order = int(input('Please enter the order value: ')) state = input('Please enter the state (as postal abbreviation): ') delivery = 0 if state in ['NC', 'SC', 'VA']: if order <= 1000: delivery = 70 elif 1000 < order < 2000: delivery = 80 else: delivery = 90 else: delivery = 50 if state in ['GA', 'WV', 'FL']: if order > 1000: delivery + 30 if order < 2000 and state in ['WV', 'FL']: delivery += 40 else: delivery + 25 print (delivery)
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