Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100890 > unrolled thread
| Started by | Prince Udoka <princeudo52@gmail.com> |
|---|---|
| First post | 2015-12-26 03:36 -0800 |
| Last post | 2015-12-27 21:00 -0800 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.python
please can i get help on this problem Prince Udoka <princeudo52@gmail.com> - 2015-12-26 03:36 -0800
Re: please can i get help on this problem Ben Finney <ben+python@benfinney.id.au> - 2015-12-26 23:15 +1100
Re: please can i get help on this problem Prince Udoka <princeudo52@gmail.com> - 2015-12-26 04:26 -0800
Re: please can i get help on this problem Prince Udoka <princeudo52@gmail.com> - 2015-12-26 05:13 -0800
Re: please can i get help on this problem Ben Finney <ben+python@benfinney.id.au> - 2015-12-27 10:11 +1100
Re: please can i get help on this problem User of Products <1991loctran@gmail.com> - 2015-12-27 21:00 -0800
| From | Prince Udoka <princeudo52@gmail.com> |
|---|---|
| Date | 2015-12-26 03:36 -0800 |
| Subject | please can i get help on this problem |
| Message-ID | <f2cb81b4-f03f-4736-98ed-9e9a01f4e17e@googlegroups.com> |
Create a function manipulate_data that does the following
Accepts as the first parameter a string specifying the data structure to be used "list", "set" or "dictionary"
Accepts as the second parameter the data to be manipulated based on the data structure specified e.g [1, 4, 9, 16, 25] for a list data structure
Based off the first parameter
return the reverse of a list or
add items `"ANDELA"`, `"TIA"` and `"AFRICA"` to the set and return the resulting set
return the keys of a dictionary.
here is my work, but i dont know what i ave done wrong:
def manipulate_data(list_data, set_data):
if list_data == ["apples", "orange", "mangoes"]:
for set_data in reversed(set_data):
return set_data
elif manipulate_data(list_data == {"apples", "orange", "mangoes"}):
list_data.append("ANDELA", "TIA", "AFRICA")
for set_data in list_data:
return set_data
if manipulate_data(list_data == {"apples": 23, "oranges": 15, "mangoes": 3, "grapes": 45}):
return list_data.keys()
[toc] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2015-12-26 23:15 +1100 |
| Message-ID | <mailman.20.1451132158.11925.python-list@python.org> |
| In reply to | #100890 |
Please help us by choosing a descriptive Subject field. The one you've chosen tells us *nothing* useful. As it turns out, I can't get anything useful from your message either: Prince Udoka <princeudo52@gmail.com> writes: > here is my work, but i dont know what i ave done wrong: Neither do I. What is confusing you, in particular? Describe what you're confused by (for example, what behaviour are you seeing, and how is that different from what you expect?). Summarise that behaviour in a short phrase and put it in the Subject field. -- \ “Please to bathe inside the tub.” —hotel room, Japan | `\ | _o__) | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | Prince Udoka <princeudo52@gmail.com> |
|---|---|
| Date | 2015-12-26 04:26 -0800 |
| Message-ID | <42000620-fc4c-4d80-b747-23accf825c52@googlegroups.com> |
| In reply to | #100891 |
gud day sir, please i have an assignment, nd i am just 2weeks in python; i tried the code i uploaded but its nt working plz help, i need guidiance
[toc] | [prev] | [next] | [standalone]
| From | Prince Udoka <princeudo52@gmail.com> |
|---|---|
| Date | 2015-12-26 05:13 -0800 |
| Message-ID | <feeb3b64-2826-4350-9ede-9a8159c98a8f@googlegroups.com> |
| In reply to | #100891 |
sir does this make sense:
def manipulate_data(item, fruits):
if item == ["apples", "oranges", "mangoes", "grapes"]:
for fruits in reversed(item):
return item
elif item == {"apples", "oranges", "mangoes", "grapes"}:
for fruits in item:
fruits.append("ANDELA", "TIA", "AFRICA")
return item
if item == {"apples": 23, "oranges": 15, "mangoes": 3, "grapes": 45}:
return dict.keys()
[toc] | [prev] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2015-12-27 10:11 +1100 |
| Message-ID | <mailman.24.1451171485.11925.python-list@python.org> |
| In reply to | #100893 |
Prince Udoka <princeudo52@gmail.com> writes: > sir does this make sense: Referring to the whole of a community as “sir” is not only too formal, it also betrays a different error: you seem to think you're in a one-on-one dialogue devoted to your issues. Please, instead of trying to make your messages more polite (your phrasing is already plenty polite enough), do us the respect of spending time on the *content* of your message. As has been asked of you many times now: When you have a question, please make it specific and answerable. Describe what *specifically* is confusing or concerning you; describe *specifically* what you did, what you expected to happen, and what happened instead. Putting effort into making your messages easiler to comprehend will be far more polite than merely calling us collectively “sir”. It will have the added benefit of getting you more useful answers. -- \ “When cryptography is outlawed, bayl bhgynjf jvyy unir | `\ cevinpl.” —Anonymous | _o__) | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | User of Products <1991loctran@gmail.com> |
|---|---|
| Date | 2015-12-27 21:00 -0800 |
| Message-ID | <74ba7e4b-df69-4943-ab21-76fc2981c6a6@googlegroups.com> |
| In reply to | #100890 |
In other words, nobody wants to do your homework for you. Your fault for being a lazy POS and doing everything last minute.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web