Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
bucketforacrown
How would I write a Python function to satisfy this doctest?
I have a test on Friday morning and can't figure out how to write this code. Assistance would be greatly appreciated!!
We have been using for & while loops, string slices, find() methods, etc.
Here is the question:
def remove_duplicates(strng):
"""
Returns a string which is the same as the argument except only the first occurrence of each letter is present. Upper and lower case letters are treated as different. Only duplicate letters are removed, other characters such as spaces or numbers are not changed.
>>> remove_duplicates("apple")
'aple'
>>> remove_duplicates("Mississippi")
'Misp'
>>> remove_duplicates("The quick brown fox jumps over the lazy dog.")
'The quick brown fx jmps v t lazy dg'
>>> remove_duplicates('121 balloons 2 u')
'121 balons 2 u'
"""
1 AnswerProgramming & Design1 decade agoCan you please help me with this Physics question about runaway shopping trolleys?
A lady, let's call her Ms Smith, is on a hill with a slope of 3 degrees. 50m downhill from her, another lady lets go of her fully laden shopping trolley (with frictionless wheels) which begins to roll straight down the hill. Ms Smith immediately chases after the cart, with a top acceleration of 2m/s^2. How far has the trolley rolled before Ms Smith catches up to it?
Now, I've had a very long summer holiday and have completely forgotten all useful physics-related information, so how would I go about this problem?
1 AnswerPhysics1 decade agoWhat is the difference between these two Intel processors?
I'm looking at buying laptop, and am tossing up between these two Toshibas; one has an Intel Pentium Dual Core processor T4300 2.1GHz, and the other Intel Core2Duo 2.2GHz. They both have 4Gb of RAM.
I'm buying this laptop to use at uni, if that gives you an indication of my usage. Which would be better? Or would I not notice a difference?
3 AnswersLaptops & Notebooks1 decade agoDo you know of any funny/cool/time-wasting blogs?
I have fallen in love with MLIA, wondered if anyone could recommend any blogs that are as awesome (or nearly as awesome) as that site
3 AnswersOther - Internet1 decade agoAm I the only person in the world that finds raw cookie dough gross?
Out of all the people I've spoken to, I seem to be the only person that hates eating uncooked cookie dough/cake mixture, e.g. I find it weird to eat raw flour and egg etc.
Is there ANYONE out there that agrees with me?
15 AnswersPolls & Surveys1 decade agoCan you please recommend me some songs?
My friend recently gave me the songs All Deliberate Speed by Mae and Skeleton Key by Margot & The Nuclear So & Sos. Do you know of any similar songs/bands?
2 AnswersOther - Music1 decade agoWho has a good rhyme to remember the Reactivity Series?
We were trying to make one up in Chemistry last week, but couldn't make a good one. And I need a good one so I'll remember it. Here are the symbols in case you've forgotten:
K
Na
Ca
Mg
Al
C
Zn
Fe
Sn
Pb
H
Cu
Ag
Au
Pt
2 AnswersHomework Help1 decade agoWhat are concrete particulars in a philosophical sense?
3 AnswersPhilosophy1 decade agoWhat are some advantages and disadvantages of using Genome Analysis to identify an inherited cancer gene?
Using the techniques PCR, gel electrophoresis, and DNA sequencing
(by the way, it is a stomach cancer gene. I ran out of characters)
1 AnswerBiology1 decade agoWhat does the protection on iTunes songs do?
You know how the songs purchased on Apple's iTunes Store have a protection on them? What does this protect them from? I heard a rumour that it meant you could only copy it five times or something. Is that true?
2 AnswersOther - Computers1 decade agoHELP!! Trig internal tomorrow and I'm still having ridiculous trouible proving things!!! Please help?
I'm currently doing some practice questions and came across one that looked simple at first until i tried it, then became hideously lost in a tangle of sins and cos's.
here's the question.
Prove that (sin2A - sinA) / (cos2A - cosA + 1) = tanA
1 AnswerMathematics1 decade agoi'm confused about null hypotheses. Can anyone explain?
I'm doing an investigation. my hypothesis is "that the age of a crown fern determines its fertility". is this the null hypothesis or the alternate?
1 AnswerBiology1 decade agoDo the trunks of ferns widen as the plant ages?
You know how tree trunks grow rings, making the tree wider as it gets older, do ferns do that too? Ferns with trunks that is, like crown ferns
1 AnswerBotany1 decade agoFerns - How would increasing population benefit them?
Crown ferns send out runners to produce more plants around them, increasing their population. how would this benefit them/help them survive?
1 AnswerBotany1 decade agoFrench speakers out there - does this make sense?
L’hymne national de la République française a été appelé car il a été a l’origine chanté dans les rues de Marseille et il est devenu connu pendant la révolution française.
1 AnswerLanguages1 decade agoFrench help PLEASE!! Another fancier way of saying beaucoup de?
i'm using beaucoup de FAR too much in my speech. My teacher wants us to use year 13/7th form/senior structures in our writing and mine is too basic. Any suggestions???
2 AnswersLanguages1 decade agoGender-inclusive language - how would i write this sentence?
what I want to say is "it was the individual's responsibility to question the world around him and consider the evidence for himself in a rational manner..."
but otago university is quite particular about using gender-inclusive words, even to the extent of using Godself instead of Himself.
so how would I word this sentence using gender-inclusive words? I could say "it was the individual's responsibility to question the world around them (which isn't right, as them is plural) and consider the evidence for themself??"
Any ideas?
1 AnswerLanguages1 decade agoCan anyone recommend me some grime artists?
I have just started getting into grime music but don't know many artists. Can you recommend me some? so far I've listened to:
Dizzee Rascal
Tinie Tempah
Kano
Bashy
Wiley
Lethal Bizzle
Lady Sov
Lele [speaks]
Skepta
Sincere
Any others you can think of? I've played those ones to death
1 AnswerOther - Music1 decade agoWhat is drum and bass?
Can you please explain to me what it is, and give me some examples of drum and bass artists?
Thanks
5 AnswersOther - Music1 decade ago