Python Programming: Anyone can help me? - Off-topic

Hey everyone.
I am taking Python programming as a part of my major currently and am a bit of a stand still on what is probably considered child's play to anyone familiar with it.
I am lost on this week assignment and having exhausted most of my resources I was hoping someone here could give me some help.
Part of this weeks assignments is to create a for loop that doesn't use the range function. A phrase must then be entered and the program must return the same phrase backward letter by letter. For example: If the word "World" is entered the program must return:
W
oW
roW
lroW
dlroW
I'm a bit stumped, the furthest I can get is this:
Word = raw_input("Input your favorite phrase: ")
#defines the variable
for letter in word:
#starts the loop based on number of letters in phrase
and uh that's about as far as I get. I don't even need a direct solution, if someone could even just point me in the right direction or has some more resources it would be helpful.
Anyone have any idea? Any help is greatly appreciated.
Thanks

Acturbo said:
Hey everyone.
I am taking Python programming as a part of my major currently and am a bit of a stand still on what is probably considered child's play to anyone familiar with it.
I am lost on this week assignment and having exhausted most of my resources I was hoping someone here could give me some help.
Part of this weeks assignments is to create a for loop that doesn't use the range function. A phrase must then be entered and the program must return the same phrase backward letter by letter. For example: If the word "World" is entered the program must return:
W
oW
roW
lroW
dlroW
I'm a bit stumped, the furthest I can get is this:
Word = raw_input("Input your favorite phrase: ")
#defines the variable
for letter in word:
#starts the loop based on number of letters in phrase
and uh that's about as far as I get. I don't even need a direct solution, if someone could even just point me in the right direction or has some more resources it would be helpful.
Anyone have any idea? Any help is greatly appreciated.
Thanks
Click to expand...
Click to collapse
Well I don't know anything about python but one place you can go for help is dreamincode.net
Although I do remember doing a program like this in C++ two years ago, I forgot how to do it....

twitch153 said:
Well I don't know anything about python but one place you can go for help is dreamincode.net
Although I do remember doing a program like this in C++ two years ago, I forgot how to do it....
Click to expand...
Click to collapse
Thanks, I'll try anything at this point. Book doesn't help me, teacher unavailable, no help searching the web. Ugh, every week I go through this................

Related

Total noob question-What is SIP????

Keep seeing references to SIP, in ClearTemp there's a setting for it, seen references but have no clue.
Any help?
Alemaker
google "what is sip?"
roverman said:
google "what is sip?"
Click to expand...
Click to collapse
BAD ADVICE !!!
your advice returned -->> Session Initiation Protocol (SIP)
Meanwhile .... when it comes to PDA ... it is actually means --->> SIP (soft input panel) --->>> onscreen input keyboard
~~~
From google query of "What is sip?":
Web definitions for sip = a small drink
Sorry, couldn't resist!
No need to be an asshole just because you know more than him and think noobs don't belong here. You could have just answered something like:
"The Session Initiation Protocol (SIP) is an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants.
You can find more information here: http://en.wikipedia.org/wiki/Session_Initiation_Protocol
Have a nice day bla bla"
Instead, you just said "google "what is sip?"" like "this is no place for stupid questions goddamit get out".
Show us a little kindness here.
Ps.: I also didn't know what SIP meant. And it in the end it wasn't what it really meant..!!! lol.
Oh well, I tried it b/c I didn't know either. Of course my SIP didn't make much sense to me either...but heck I'm just a GIT (geek in training). Thanks for the correction.
And sorry Alemaker for the misdirection-although with your name, maybe a small drink is the def. you were looking for, LOL
UnicornKaz said:
Meanwhile .... when it comes to PDA ... it is actually means --->> SIP (soft input panel) --->>> onscreen input keyboard
~~~
Click to expand...
Click to collapse
Thx- but now why would there be references I see, like in ClearTemp where there is a Dead SIP item? is a Dead SIP a bad contact point?
For PDAs, SIP can be either Soft Input Panel (soft keyboard) or Session Initiated Protocol (for VOIP calls).
jym04 said:
No need to be an asshole just because you know more than him and think noobs don't belong here. You could have just answered something like:
"The Session Initiation Protocol (SIP) is an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants.
You can find more information here: http://en.wikipedia.org/wiki/Session_Initiation_Protocol
Have a nice day bla bla"
Instead, you just said "google "what is sip?"" like "this is no place for stupid questions goddamit get out".
Show us a little kindness here.
Ps.: I also didn't know what SIP meant. And it in the end it wasn't what it really meant..!!! lol.
Click to expand...
Click to collapse
Actually didn't think it was unkind. Actually, it was quite motherly given other responses on this forum. I could have copied and pasted what I read on google or let him/her read as much as he wanted or was interested in reading on google. Sheesh.
roverman said:
google "what is sip?"
Click to expand...
Click to collapse
roverman: If your going to flame someone on their due diligence make sure you don't look stupid and do yours.. or actually know WTF your talking about... think before you flame at least he says hes a noob.. whats your excuse?
google "define pocket pc sip"
Alemaker:
google "ClearTemp sip"
"I've also added a new entry named "Dead SIPs". Sometimes, certain SIPs are not removed from the SIP list properly upon uninstallation. This is where this feature will be helpful. ClearTemp helps you to remove the registry key that is associated with the uninstalled SIP(s)."
http://mobile-sg.com/simpleblog/archives/post.asp?id=1216
jinnosuke said:
Alemaker:
google "ClearTemp sip"
"I've also added a new entry named "Dead SIPs". Sometimes, certain SIPs are not removed from the SIP list properly upon uninstallation. This is where this feature will be helpful. ClearTemp helps you to remove the registry key that is associated with the uninstalled SIP(s)."
http://mobile-sg.com/simpleblog/archives/post.asp?id=1216
Click to expand...
Click to collapse
did see that from the cleartemp site and that's what got me asking to begin with-what's the context here? Is his reference of SIP to an installed VOIP element-or is this something to do with the touchscreen?
Alemaker said:
did see that from the cleartemp site and that's what got me asking to begin with-what's the context here? Is his reference of SIP to an installed VOIP element-or is this something to do with the touchscreen?
Click to expand...
Click to collapse
In that instance it would be in relation to the SIP (Soft Input Panel). I guess sometimes they don’t uninstall correctly and that will clean the dead ones.
ok-well, that clears it up for me- I think
- lol
Thx
jinnosuke said:
roverman: If your going to flame someone on their due diligence make sure you don't look stupid and do yours.. or actually know WTF your talking about... think before you flame at least he says hes a noob.. whats your excuse?
google "define pocket pc sip"
Alemaker:
google "ClearTemp sip"
"I've also added a new entry named "Dead SIPs". Sometimes, certain SIPs are not removed from the SIP list properly upon uninstallation. This is where this feature will be helpful. ClearTemp helps you to remove the registry key that is associated with the uninstalled SIP(s)."
http://mobile-sg.com/simpleblog/archives/post.asp?id=1216
Click to expand...
Click to collapse
Let's all take a deep breath here. I didn't flame him, I tried to help with a simple solution. Very sorry I didn't ask him how his family was and wish him a happy day. I considered cutting and pasting what I read on google, but thought better to not pretend I knew what I was talking about. I guess I could have explained all this in the first post, but didn't. I've tried to help noobs, being one myself, with posts before they get ripped on by the regulars. My mistake. And have a nice day.
Chill out guys.
TLAs and FLAs are a PITA as they are extremely context sensitive.
roverman said:
Let's all take a deep breath here. I didn't flame him, I tried to help with a simple solution. Very sorry I didn't ask him how his family was and wish him a happy day. I considered cutting and pasting what I read on google, but thought better to not pretend I knew what I was talking about. I guess I could have explained all this in the first post, but didn't. I've tried to help noobs, being one myself, with posts before they get ripped on by the regulars. My mistake. And have a nice day.
Click to expand...
Click to collapse
If you don't know the answer just be quiet, don't give advices!

How to disable capital letters after punctuation mark in SMS/E-mails?

Hi all,
I don't like the feature that a word at the beginning of a sentence will be capitalized automatically when writing an E-Mail or text message. Does anybody know how to switch that off? I know that there are some related settings in the input section, but these settings have no effect on my upper case problem.
I guess (hope) there is some registry setting. Does anybody know a solution?
Cheers,
foo
P.S.: The reason why I hate this feature is that it works wrong for me. When I write an E-mail I start like:
Hello blabla,
how are you today? ...
actually the "h" will be capitalized automatically which is wrong.
haven't found one yet (although haven't looked hard). If you undo straight after the capitalization the word returns to normal (although undo is pretty hard without a Ctrl key on the hardware keyboard).
foo said:
Hi all,
I don't like the feature that a word at the beginning of a sentence will be capitalized automatically when writing an E-Mail or text message. Does anybody know how to switch that off? I know that there are some related settings in the input section, but these settings have no effect on my upper case problem.
I guess (hope) there is some registry setting. Does anybody know a solution?
Cheers,
foo
P.S.: The reason why I hate this feature is that it works wrong for me. When I write an E-mail I start like:
Hello blabla,
how are you today? ...
actually the "h" will be capitalized automatically which is wrong.
Click to expand...
Click to collapse
The setting is in the soft keyboard options. Tap the little arrow next to your keyboard icon and see the options tab at the bottom.
Uncheck the box "Capitalize first letter of sentence"
This may not work on some extra keyboards/sips you install and may need immediate soft reset to make changes.
apprentice said:
Uncheck the box "Capitalize first letter of sentence"
Click to expand...
Click to collapse
This setting is already unchecked but has no effect.
Did any of you guys ever manage to fix the Capitalisation issue?
I've just bought an HTC Touch Pro 2 and am having the same issue.
Checking or unchecking the box, warm reset, cold reset, nothing makes a difference.
I'm someone who IS very much bothered buy auto-capitalisation, and so would appreciate any help anyone can offer.
Cheers.
Yup, have the same problem since I got this phone last year! I searched back and forth, up and down and NOBODY knew a solution so far. And I guess, not so many are bothered by this crap either...!
Some say its windows fault... BUT even in word (windows) we can DISABLE this crap... and why is it there to UNcheck if it does not work??? So this is definately a fault... from SE or MS, I don't care... just fix it...make it work as it is suppose to (unchecking means DISABLED!!!!)!!!!!!!!!!
If you find a solution, please share here. But frankly, I don't think there is a registry solution for this. So until SE or MS are really acknowledging this and fix it, there won't be a 'real unchecking' of this crapppppp!
Unbelievable, eh?
Reading other forums on the same topic I see that people all miss the point. Some people love auto capitalisation, which is fine and fair and good for them, while others - like us - hate it. It should up to the USER to decide whether or not they want it, not the manufacturer, and not other forum users either!
I too am at a total loss to find any solution. let's keep this thread alive, and anyone who finds anything at all that might help please do post.
Thanks.
i don't have any resolution to offer. sorry.
but i am another confused end user, highly bothered by this automatic capitalization setting. i share the ineffectual setting problem.
however i do have some good news. i'm running the newest NFSFAN ROM 6.5, and the setting actually does take effect in the ROMs custom text message input field. in all other text input fields, it doesn't.
if anyone can help us, it has to be NFSFAN, NFSFAN ROM's developer.
foo said:
P.S.: The reason why I hate this feature is that it works wrong for me. When I write an E-mail I start like:
Hello blabla,
how are you today? ...
actually the "h" will be capitalized automatically which is wrong.
Click to expand...
Click to collapse
Not in English and formatted like that it's not
I'm one of the ones that doesn't mind it. 99% of the time it's right for me. I always E-mail and SMS with full words no shortcuts and it saves me an extra tap when starting a new sentence, whether the new sentence follows a full stop on the same line of comes after a full stop and then I move to a new line.
It definitely wont turn off on mine either though.
Steve_TLS said:
Not in English and formatted like that it's not
Click to expand...
Click to collapse
Capital letter after a comma?
orelsi said:
Capital letter after a comma?
Click to expand...
Click to collapse
I did say in that format...
Right
Hello Steve,
How are....
Click to expand...
Click to collapse
Wrong
Hello Steve,
how are blah blah..
Click to expand...
Click to collapse
It's not an English lesson, but it's right more times than it is wrong. (When typing correctly).
Got it!
Well right or wrong... I found the solution.
There are two files located in the windows directory, that are responsible for auto-capitalization:compose_sms.htm (used when composing text/sms)
compose_note.htm (used when composing email)​As the extension already indicates, these files are really html files.
You have to edit these files and remove every occurrence of the word "autocap" within. I used total commander for the job (it comes with an integrated notepad).
After I saved the files I had no more auto-capitalization. (It's not even necessary to do a reset)
P.S.: You should do a backup of the two files before editing them, just in case you mess something up.
Good job!
Pity the tick just doesn't work properly.
It's not because of the comma that you get the capital letter. It's because of the line break.
By the way.
Hello xxxxxx,
I was wondering what...
Is correct as far as I am aware. Every letter I get from anywhere has a capital letter in the first paragraph.
Matt1408 said:
It's not because of the comma that you get the capital letter. It's because of the line break.
Click to expand...
Click to collapse
Yes, that's right, but there are other situations like using abbreviations (followed by a punctuation mark) in sentences where autocap fails.
Matt1408 said:
By the way.
Hello xxxxxx,
I was wondering what...
Is correct as far as I am aware. Every letter I get from anywhere has a capital letter in the first paragraph.
Click to expand...
Click to collapse
The orthography varies of course in different languages. In German language it is a rule to start the first sentence lower case after a salutation followed by a comma. If I used an exclamation point, which is also valid after the salutation, I have to start the next sentence upper case.
In other words:
Hallo Herr Bla,
danke für Ihre Bla Bla...
is correct in German language but might be wrong in English language.
Thanks... YOU are THE MAN !!!
foo said:
Well right or wrong... I found the solution.
There are two files located in the windows directory, that are responsible for auto-capitalization:compose_sms.htm (used when composing text/sms)
compose_note.htm (used when composing email)​As the extension already indicates, these files are really html files.
You have to edit these files and remove every occurrence of the word "autocap" within. I used total commander for the job (it comes with an integrated notepad).
After I saved the files I had no more auto-capitalization. (It's not even necessary to do a reset)
P.S.: You should do a backup of the two files before editing them, just in case you mess something up.
Click to expand...
Click to collapse
This is brilliant work! Thanks a lot and it WORKS! Just changed it and now this stupid auto cap is gone!!! Since this is a Read Only File, it should stay like that too!
Actually I don't know any language where one writes a Capital letter (except in english the 'I')! So this is just crap and an oversight from MS that this cannot be changed even though its UNchecked in settings!
This autocap was also capitalizing when just pressing the ENTER key and a new line was started, no matter if there was a Period or a Comma!!!!!
Thanks again from all of us who suffered from this...until now!
First up, as the guy who started this thread 100 years ago, my apologies for not being a part of it lately. I've been away.
Secondly, a thousand thanks to Foo for the HTML solution, which I'll try immediately.
Does this solution also stop auto full-stop (auto period in the US!) as well? No one in the thread has yet mentioned the REALLY infuriating feature: type two spaces and you automatically get a full stop and then auto captialisation as well. At least you do on my TP2!
There's certainly no harm in a healthy discussion about what is or is not correct punctuation (although this isn't really the right forum for that), but the truth is we're all free to spell and punctuate however we want, and it's not the place of any software or hardware designer to tell us how we should do that. If I choose to spell the word "Individual" with three Zs, a silent Q and a fullstop in the midle, that's my choice and the software should allow me to do so!
An hour later, and an update on my progress with Foo's HTLM fix:
The fix has eliminated Autocapitalisation after voluntary fullstops, for which a HUGE THAK YOU
However, it hasn't cured the "double-space = auto fullstop and auto capitalisation" issue. Does anyone have ideas on removing that one?
Cheers.
compse_*.htm in ROM and immutable?
I've just upgraded to an official WM6.5 release on my Touch Diamond 2, and have encountered the same annoying problem with first letter capitalization staying on despite the user visible configuration setting.
I've found the \Windows directory compose_*.htm files, with the 'autocap' flags in them .. but on my device these compose_*.htm files appear to be in ROM and immutable. I can't change their permissions to make them non-hidden and/or non-readonly, and I can't delete, edit or overwrite them.
Any ideas, or am I "Stuck" Capitalizing The First Letter Wherever Microsoft Though It Was A Good Idea? Heh.
Thanks!
Jay
foo said:
Well right or wrong... I found the solution.
There are two files located in the windows directory, that are responsible for auto-capitalization:compose_sms.htm (used when composing text/sms)
compose_note.htm (used when composing email)​As the extension already indicates, these files are really html files.
You have to edit these files and remove every occurrence of the word "autocap" within. I used total commander for the job (it comes with an integrated notepad).
After I saved the files I had no more auto-capitalization. (It's not even necessary to do a reset)
P.S.: You should do a backup of the two files before editing them, just in case you mess something up.
Click to expand...
Click to collapse
This doesn't work for me. There is no data in these files that says "autocap", it's just a general template for SMS and Email messages.

noob needs help coding app

Ok so I've never coded in java before its all new to me and i am trying to make an app that would do the same as this (check it out here) old Motorola razr mod, the led's and screens would flash in a pattern when music was played or any vibration into the microphone. I thought this idea could make a cool app for android, so i have begun coding it, and i have pretty much got the interface setup, but when it comes to making the slider i added actually do anything i have no idea and i have no idea how to make buttons actually preform an action, also i have no idea how to go about controlling hardware on the phone like the microphone and various lights to flash. Is there any way anyone can help or give some tips i appreciate any input. Thus far my layout consist of a spinner to chose the different patterns for the lights to flash, then the start button, then a slider to choose how sensitive the microphone is to incoming vibrations. They do nothing yet cause i am not quite sure where to go from here. If you feel you can contribute any knowledge my way i will be grateful, the only coding i have done is minor html stuff although not much different than the xml code involved i have no idea what to do for the java part. Please Help.
Thank you much!
There really isn't anything one could contribute to your knowledge if you don't have experience with an object oriented language like Java. You will need to hop on Google and look at Java tutorials and possibly some object oriented design books. Once you have a good grasp on Java you can then begin learning the API's for Android that Google provides.
So if you're looking for a suggestion there is mine.
Steps you should take
Learn object oriented programming (OOP)
Learn Java
Learn the Android API
thank you, will do.
Yeah man if all you know is minor html you have a lot to learn since theres almost no relation there. I started to learn some java a couple years ago but lost any time for it but when I was learning the best way I found to learn apart from actually taking a class was AppDev. I had the J2SE and J2ME learning programs. Its as close to being in a class room as you can get. There is an instructor, exercises, tests ect. Basically the Rosetta stone for programing.
Do the Hello, World! demos on the official Android site, and take a look at the APIDemos included in the SDK- there's lots of short code samples demonstrating things like buttons and sliders.
And I disagree with the prior poster- learn Java, then OOP. The explanations of object oriented programming will just confuse you until you have some coding practice.
thank you all for the advice, its nice to see that people care enough to help out a noob around here lol
I was a noob to android awhile ago too, though now I'm finalizing a falling sand game for the market =D.
I had experience in c++, c, and html when I first started looking at android. What helped the most was going throught he examples and copying and pasting code into my code until I could figure out how stuff works. The android developers section on www.android.com helped alot, espcially the guide and refrence tabs. I also did a google code search to find the source of another android project that I could reference off of.
It also helps a lot if you have another person that you can work with, it's a lot harder to get discouraged that way.
One last suggestion, use the android-developers forums from google, there's a lot of really good help there. The stack overflow website is also really helpful if you have a general question about java, but not android in specific.
Good luck!
Will be glad to help you along your way once you start coding it. I can write an example app that does all the flashing bits for you. Would have to make it play off the internal media player though and not external audio. Not sure I could code it to do exactly what they did in the video.
Whatever you do, don't ready the notepad toturial that is way advanced and confusing. I highly recommend the hello views tutorials as well as reading the application fundamentals and all the stuff in that category of the dev guide, I forget what its called. But just reading will only get you so far, just try things one at a time. Also #android-dev on freenode ca be a ton of help if your there at the right time, but sometimes its tottaly dead....
There are a ton of awesume tutorials on android-dev's website reading the code there allways helps me understand how new ideas work. But as mentioned earlyer you really need to know oop programing and java...

[Help] need help programming a ti-89 calculator.

I would love to program ti-89 calculator, but unfortunately I have no idea how to do so, could someone write what I am trying to program!? Or teach me how to since the tutorials I have seen don't teach me how to solve my problem cuz what I am trying to programming is sot of complicated.
It consists on having a few formulas for my phisics class, and make the formulas interact with each other in order to find the missing variables. Also, write a function, and make the calculator graph it and find some things like maximums minimums, continuity etc etc.
Hope someone reads this, I will be eternally thankful !
Sorry for my grammar!
Sorry if this does not belong here, I do not know where else to post this.
i suggest u should learn Malbolge programming language first.

Android Studio coding help needed

Hi, firstly I just wanna say I'm completely new to android studio & coding. I recently began building my first app & feel like my head is gonna explode
I've tried searching online for an answer to my question but couldn't find anything related, so I thought I'd post it here and see if any of you guys could help me out.
So I spent all of last night trying to create a splash screen and login page for my app, which I still haven't completed but thought I'd get ahead of myself and prepare for the next steps and potential issues I could encounter.
I want to create a circle image next to people's names which they can click and change with a different image (not on their phones device but within the app) just a simple image such as the letter from A-Z which are different colours. I have no idea how to do this or if it is even possible? Sorry if I am not explaining myself clearly but any help or advice would be much appreciated.
Thanks in advance
Spyro0408 said:
Hi, firstly I just wanna say I'm completely new to android studio & coding. I recently began building my first app & feel like my head is gonna explode
I've tried searching online for an answer to my question but couldn't find anything related, so I thought I'd post it here and see if any of you guys could help me out.
So I spent all of last night trying to create a splash screen and login page for my app, which I still haven't completed but thought I'd get ahead of myself and prepare for the next steps and potential issues I could encounter.
I want to create a circle image next to people's names which they can click and change with a different image (not on their phones device but within the app) just a simple image such as the letter from A-Z which are different colours. I have no idea how to do this or if it is even possible? Sorry if I am not explaining myself clearly but any help or advice would be much appreciated.
Thanks in advance
Click to expand...
Click to collapse
best resource for googling all coding questions is stackoverflow.com
i.e., related to your posting: google for "android click image change background resource stackoverflow"

Categories

Resources