Reputation: 2 Apprentice
- Active Posts:
- 28 (0.03 per day)
- 07-October 11
- Profile Views:
- Last Active:
- Mar 31 2013 04:55 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 30 Mar 2013Well, I don't really know Java, but nonetheless I guarantee that the way you are trying to justify things is grossly overcomplicating them.
raw_input is a function. It will print the string argument it is passed and then wait for a user input. The string argument you pass it is not part of the return value.
a = raw_input("Input whatever: ")will assign the return value of the raw_input function to a. a couldn't care less what string you passed to raw_input.
As for your functions you wrote at the end, they don't work because variables defined in functions are local. You need to return values from functions.
Pretty much the way you did it originally is probably what you want though:
a = raw_input("Enter a string: ") print (a)a now holds the value of the raw_input (what the user typed; not the string you passed to raw_input) and you also printed a to the screen (which seems redundant as the user just typed it). What about this isn't what you want?
I seem to over complicate lots of things
It isn't what I want I'm just trying to understand the syntax... So now that you have confirmed that the variable is local.... how do I make a variable that isn't local that I could use in another defined function? Could do something like this:
#a would be a local variable (i know this is wrong its just an example) String a b = raw_input("enter a string") a = b print(B)/>/>/>
I don't know what the "/>" is about after
print(B)/>/>i have deleted it several times in the edit option and then re-posted but it keeps appearing.
Does that make sense?
ok this is weird and annoying /> keeps showing up in my posts and i don't know why after deleting them and submitting the modified post they still exist
Posted 7 Feb 2012
Posted 7 Feb 2012Were any other settings reverted back to default? If so it's possible the battery might be faulty.
No, no other settings were changed and my instructor here at my programming class said the same thing. The thing is I highly doubt It's the cmos battery is failing because I bought this motherboard 7 months ago, It is a asus crosshair IV extreme, unless It came faulty which isn't a big deal of course Ill just have to go buy another one(battery).
Posted 23 Jan 2012Hey, i figured this would be the place to post this instead of making a new thread. So I am a semi new to java, and even more "new" to java swing. My question is how would or is this even possible? Create a JTextBox and lets say "align" it to the left, right, or center Even better set its location to a specific location on the frame using pixel arrangement?
- Member Title:
- New D.I.C Head
- 19 years old
- December 1, 1994
- Computer, and more computers.
- Full Name: