Limited Offer Get 25% off — use code BESTW25
No AI No Plagiarism On-Time Delivery Free Revisions
Claim Now
Prices start at $5 per page · plagiarism-free papers · free revisions for 14 days 24/7 support: support@bestwriters.com
Uncategorized

an arbitrary sequence of strings

  • Posted
  • Authoradmin
  • Length155 words
  • Reading time1 min
Write My Assignment FREE

Start
by assigning to variable answers a list containing an arbitrary
sequence of strings ‘Y’ and ‘N’. For example:

answers=
[‘Y’,’N’,’N’,’Y’,’N’,’Y’,’Y’,’Y’,’N’,’N’,’N’]

Write Python statements
corresponding to the following:
(a) assign to variable numYes
the number of occurrences of ‘Y’ in list answers.
(b) assign to
variable numNo the number of occurrences of ‘N’ in list answers.
(c)
assign to variable percentYest the percentage of strings in answers
that are ‘Y’.
(d) sort the list answers.
(e) Assign to
variable f the index of the first occurrence of ‘Y’ in sorted list
answers.

thank
you in advance

The post an arbitrary sequence of strings appeared first on My Assignment Online.

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

✓ Native UK, USA & Australia writers ✓ Deadline from 3 hours ✓ 100% Plagiarism-Free — Turnitin included ✓ Unlimited free revisions ✓ Free to submit — compare quotes

admin

Academic writer and editor at BestWriters.

Get your paper off your plate tonight

Post your instructions for free. Prices start at $5 per page.

Place an order