How to get rid of the parenthesis and comma in my output?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am writing a code in python where I use different functions to calculate wage, federal tax, state tax, and net worth. Everything is fine except my output says, ('Your wage is: $', 989)
instead of Your wage is: $989
I tried using +(wag)
but it doesn't let me run it. How do I get rid of the parenthesis, comma, and quotation marks from the output? And how do I make the output have no decimal points? I am not using float, so I don't know why it's still giving me decimal points. Here's my code:
def Calculatewages():
wage = (work*hours)
return wage
def CalcualteFederaltax():
if (status== ("Married")):
federaltax = 0.20
elif (status== ("Single")):
federaltax = 0.25
elif status:
federaltax = 0.22
federaltax = float(wag*federaltax)
return federaltax
def Calculatestatetax():
if(state=="CA") or (state=="NV") or (state=="SD") or (state=="WA") or (state=="AZ"):
statetax = 0.08
if (state== "TX") or(state=="IL") or (state=="MO") or (state=="OH") or (state=="VA"):
statetax = 0.07
if (state== "NM") or (state== "OR") or (state=="IN"):
statetax = 0.06
if (state):
statetax = 0.05
statetax = float(wag*statetax)
return statetax
def Calculatenet():
net = float(wag-FederalTax-StateTax)
return net
hours = input("Please enter your work hours: ")
work = input("Please enter your hourly rate: ")
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
print("**********")
wag = Calculatewages()
FederalTax = CalcualteFederaltax()
StateTax = Calculatestatetax()
Net = Calculatenet()
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
python python-3.x
add a comment |
I am writing a code in python where I use different functions to calculate wage, federal tax, state tax, and net worth. Everything is fine except my output says, ('Your wage is: $', 989)
instead of Your wage is: $989
I tried using +(wag)
but it doesn't let me run it. How do I get rid of the parenthesis, comma, and quotation marks from the output? And how do I make the output have no decimal points? I am not using float, so I don't know why it's still giving me decimal points. Here's my code:
def Calculatewages():
wage = (work*hours)
return wage
def CalcualteFederaltax():
if (status== ("Married")):
federaltax = 0.20
elif (status== ("Single")):
federaltax = 0.25
elif status:
federaltax = 0.22
federaltax = float(wag*federaltax)
return federaltax
def Calculatestatetax():
if(state=="CA") or (state=="NV") or (state=="SD") or (state=="WA") or (state=="AZ"):
statetax = 0.08
if (state== "TX") or(state=="IL") or (state=="MO") or (state=="OH") or (state=="VA"):
statetax = 0.07
if (state== "NM") or (state== "OR") or (state=="IN"):
statetax = 0.06
if (state):
statetax = 0.05
statetax = float(wag*statetax)
return statetax
def Calculatenet():
net = float(wag-FederalTax-StateTax)
return net
hours = input("Please enter your work hours: ")
work = input("Please enter your hourly rate: ")
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
print("**********")
wag = Calculatewages()
FederalTax = CalcualteFederaltax()
StateTax = Calculatestatetax()
Net = Calculatenet()
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
python python-3.x
Did it successfully run? How do you know there is paranthesis and comma in output without actually seeing the output?
– Austin
Nov 15 '18 at 7:24
1
You think you're on Python 3, but that output says you're not.
– user2357112
Nov 15 '18 at 7:27
@Austin I ran it on c9.io which is a website my teacher provided, and it works, but just has parenthesis, commas, and quotation marks for some weird reason
– H. Khan
Nov 15 '18 at 7:39
add a comment |
I am writing a code in python where I use different functions to calculate wage, federal tax, state tax, and net worth. Everything is fine except my output says, ('Your wage is: $', 989)
instead of Your wage is: $989
I tried using +(wag)
but it doesn't let me run it. How do I get rid of the parenthesis, comma, and quotation marks from the output? And how do I make the output have no decimal points? I am not using float, so I don't know why it's still giving me decimal points. Here's my code:
def Calculatewages():
wage = (work*hours)
return wage
def CalcualteFederaltax():
if (status== ("Married")):
federaltax = 0.20
elif (status== ("Single")):
federaltax = 0.25
elif status:
federaltax = 0.22
federaltax = float(wag*federaltax)
return federaltax
def Calculatestatetax():
if(state=="CA") or (state=="NV") or (state=="SD") or (state=="WA") or (state=="AZ"):
statetax = 0.08
if (state== "TX") or(state=="IL") or (state=="MO") or (state=="OH") or (state=="VA"):
statetax = 0.07
if (state== "NM") or (state== "OR") or (state=="IN"):
statetax = 0.06
if (state):
statetax = 0.05
statetax = float(wag*statetax)
return statetax
def Calculatenet():
net = float(wag-FederalTax-StateTax)
return net
hours = input("Please enter your work hours: ")
work = input("Please enter your hourly rate: ")
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
print("**********")
wag = Calculatewages()
FederalTax = CalcualteFederaltax()
StateTax = Calculatestatetax()
Net = Calculatenet()
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
python python-3.x
I am writing a code in python where I use different functions to calculate wage, federal tax, state tax, and net worth. Everything is fine except my output says, ('Your wage is: $', 989)
instead of Your wage is: $989
I tried using +(wag)
but it doesn't let me run it. How do I get rid of the parenthesis, comma, and quotation marks from the output? And how do I make the output have no decimal points? I am not using float, so I don't know why it's still giving me decimal points. Here's my code:
def Calculatewages():
wage = (work*hours)
return wage
def CalcualteFederaltax():
if (status== ("Married")):
federaltax = 0.20
elif (status== ("Single")):
federaltax = 0.25
elif status:
federaltax = 0.22
federaltax = float(wag*federaltax)
return federaltax
def Calculatestatetax():
if(state=="CA") or (state=="NV") or (state=="SD") or (state=="WA") or (state=="AZ"):
statetax = 0.08
if (state== "TX") or(state=="IL") or (state=="MO") or (state=="OH") or (state=="VA"):
statetax = 0.07
if (state== "NM") or (state== "OR") or (state=="IN"):
statetax = 0.06
if (state):
statetax = 0.05
statetax = float(wag*statetax)
return statetax
def Calculatenet():
net = float(wag-FederalTax-StateTax)
return net
hours = input("Please enter your work hours: ")
work = input("Please enter your hourly rate: ")
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
print("**********")
wag = Calculatewages()
FederalTax = CalcualteFederaltax()
StateTax = Calculatestatetax()
Net = Calculatenet()
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
python python-3.x
python python-3.x
asked Nov 15 '18 at 7:14
H. KhanH. Khan
317
317
Did it successfully run? How do you know there is paranthesis and comma in output without actually seeing the output?
– Austin
Nov 15 '18 at 7:24
1
You think you're on Python 3, but that output says you're not.
– user2357112
Nov 15 '18 at 7:27
@Austin I ran it on c9.io which is a website my teacher provided, and it works, but just has parenthesis, commas, and quotation marks for some weird reason
– H. Khan
Nov 15 '18 at 7:39
add a comment |
Did it successfully run? How do you know there is paranthesis and comma in output without actually seeing the output?
– Austin
Nov 15 '18 at 7:24
1
You think you're on Python 3, but that output says you're not.
– user2357112
Nov 15 '18 at 7:27
@Austin I ran it on c9.io which is a website my teacher provided, and it works, but just has parenthesis, commas, and quotation marks for some weird reason
– H. Khan
Nov 15 '18 at 7:39
Did it successfully run? How do you know there is paranthesis and comma in output without actually seeing the output?
– Austin
Nov 15 '18 at 7:24
Did it successfully run? How do you know there is paranthesis and comma in output without actually seeing the output?
– Austin
Nov 15 '18 at 7:24
1
1
You think you're on Python 3, but that output says you're not.
– user2357112
Nov 15 '18 at 7:27
You think you're on Python 3, but that output says you're not.
– user2357112
Nov 15 '18 at 7:27
@Austin I ran it on c9.io which is a website my teacher provided, and it works, but just has parenthesis, commas, and quotation marks for some weird reason
– H. Khan
Nov 15 '18 at 7:39
@Austin I ran it on c9.io which is a website my teacher provided, and it works, but just has parenthesis, commas, and quotation marks for some weird reason
– H. Khan
Nov 15 '18 at 7:39
add a comment |
3 Answers
3
active
oldest
votes
For this part:
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
you can rewrite it as this using string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
This is useful as you can insert the value into any place in the string (wherever you put the curly brackets).
As for your decimal points problem you can use the built in round function like this:
round(float(variable), int(decimal_places))
for example:
round(1.43523556, 2)
will return 1.44
add a comment |
There are no quotes or parenthesis in the output in python 3.x
, Check if you are running on python 2
or python 3
. Looks like you are on python 2
by judging your output.
So change all your print statements like this
print "Your net wage is: $", wag # remove brackets
...
However, if you want it to run on python 3 your code doesn't run as you are multiplying 2 strings in this line
def Calculatewages():
wage = (work*hours) # <------ here
return wage
To fix this issue you must cast them into int
and then your code should run without problems.
hours = int(input("Please enter your work hours: ")) # < ---- Cast to int
work = int(input("Please enter your hourly rate: ")) # < ---- Cast to int
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
My output:
Please enter your work hours: 8
Please enter your hourly rate: 10
Please enter your state of resident: IN
Please enter your marital status: Single
**********
Your wage is: $ 80
Your federal tax is: $ 20.0
Your state tax is: $ 4.0
Your net wage is: $ 56.0
you can also use string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
Oh ok I get it now, but do you know how to get rid of the space between$
and the output number?
– H. Khan
Nov 15 '18 at 7:43
@H.Khan Remove the$
from the print statement.print "Your net wage is: ", wag
like this
– Vineeth Sai
Nov 15 '18 at 7:45
Sorry I meant have it output$20
instead of$ 20.0
– H. Khan
Nov 15 '18 at 7:48
Here's how you can do that,print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
add a comment |
If you're running under python3.x, then with your code, it should print out without the parenthesis, and if you're running under python2.x, then to get rid of the parenthesis, you might wanna try:
print "Your wage is: $", wag
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314182%2fhow-to-get-rid-of-the-parenthesis-and-comma-in-my-output%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
For this part:
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
you can rewrite it as this using string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
This is useful as you can insert the value into any place in the string (wherever you put the curly brackets).
As for your decimal points problem you can use the built in round function like this:
round(float(variable), int(decimal_places))
for example:
round(1.43523556, 2)
will return 1.44
add a comment |
For this part:
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
you can rewrite it as this using string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
This is useful as you can insert the value into any place in the string (wherever you put the curly brackets).
As for your decimal points problem you can use the built in round function like this:
round(float(variable), int(decimal_places))
for example:
round(1.43523556, 2)
will return 1.44
add a comment |
For this part:
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
you can rewrite it as this using string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
This is useful as you can insert the value into any place in the string (wherever you put the curly brackets).
As for your decimal points problem you can use the built in round function like this:
round(float(variable), int(decimal_places))
for example:
round(1.43523556, 2)
will return 1.44
For this part:
print("Your wage is: $" ,wag)
print("Your federal tax is: $",FederalTax)
print("Your state tax is: $",StateTax)
print("Your net wage is: $",Net)
you can rewrite it as this using string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
This is useful as you can insert the value into any place in the string (wherever you put the curly brackets).
As for your decimal points problem you can use the built in round function like this:
round(float(variable), int(decimal_places))
for example:
round(1.43523556, 2)
will return 1.44
answered Nov 15 '18 at 7:40
hhaefligerhhaefliger
29712
29712
add a comment |
add a comment |
There are no quotes or parenthesis in the output in python 3.x
, Check if you are running on python 2
or python 3
. Looks like you are on python 2
by judging your output.
So change all your print statements like this
print "Your net wage is: $", wag # remove brackets
...
However, if you want it to run on python 3 your code doesn't run as you are multiplying 2 strings in this line
def Calculatewages():
wage = (work*hours) # <------ here
return wage
To fix this issue you must cast them into int
and then your code should run without problems.
hours = int(input("Please enter your work hours: ")) # < ---- Cast to int
work = int(input("Please enter your hourly rate: ")) # < ---- Cast to int
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
My output:
Please enter your work hours: 8
Please enter your hourly rate: 10
Please enter your state of resident: IN
Please enter your marital status: Single
**********
Your wage is: $ 80
Your federal tax is: $ 20.0
Your state tax is: $ 4.0
Your net wage is: $ 56.0
you can also use string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
Oh ok I get it now, but do you know how to get rid of the space between$
and the output number?
– H. Khan
Nov 15 '18 at 7:43
@H.Khan Remove the$
from the print statement.print "Your net wage is: ", wag
like this
– Vineeth Sai
Nov 15 '18 at 7:45
Sorry I meant have it output$20
instead of$ 20.0
– H. Khan
Nov 15 '18 at 7:48
Here's how you can do that,print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
add a comment |
There are no quotes or parenthesis in the output in python 3.x
, Check if you are running on python 2
or python 3
. Looks like you are on python 2
by judging your output.
So change all your print statements like this
print "Your net wage is: $", wag # remove brackets
...
However, if you want it to run on python 3 your code doesn't run as you are multiplying 2 strings in this line
def Calculatewages():
wage = (work*hours) # <------ here
return wage
To fix this issue you must cast them into int
and then your code should run without problems.
hours = int(input("Please enter your work hours: ")) # < ---- Cast to int
work = int(input("Please enter your hourly rate: ")) # < ---- Cast to int
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
My output:
Please enter your work hours: 8
Please enter your hourly rate: 10
Please enter your state of resident: IN
Please enter your marital status: Single
**********
Your wage is: $ 80
Your federal tax is: $ 20.0
Your state tax is: $ 4.0
Your net wage is: $ 56.0
you can also use string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
Oh ok I get it now, but do you know how to get rid of the space between$
and the output number?
– H. Khan
Nov 15 '18 at 7:43
@H.Khan Remove the$
from the print statement.print "Your net wage is: ", wag
like this
– Vineeth Sai
Nov 15 '18 at 7:45
Sorry I meant have it output$20
instead of$ 20.0
– H. Khan
Nov 15 '18 at 7:48
Here's how you can do that,print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
add a comment |
There are no quotes or parenthesis in the output in python 3.x
, Check if you are running on python 2
or python 3
. Looks like you are on python 2
by judging your output.
So change all your print statements like this
print "Your net wage is: $", wag # remove brackets
...
However, if you want it to run on python 3 your code doesn't run as you are multiplying 2 strings in this line
def Calculatewages():
wage = (work*hours) # <------ here
return wage
To fix this issue you must cast them into int
and then your code should run without problems.
hours = int(input("Please enter your work hours: ")) # < ---- Cast to int
work = int(input("Please enter your hourly rate: ")) # < ---- Cast to int
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
My output:
Please enter your work hours: 8
Please enter your hourly rate: 10
Please enter your state of resident: IN
Please enter your marital status: Single
**********
Your wage is: $ 80
Your federal tax is: $ 20.0
Your state tax is: $ 4.0
Your net wage is: $ 56.0
you can also use string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
There are no quotes or parenthesis in the output in python 3.x
, Check if you are running on python 2
or python 3
. Looks like you are on python 2
by judging your output.
So change all your print statements like this
print "Your net wage is: $", wag # remove brackets
...
However, if you want it to run on python 3 your code doesn't run as you are multiplying 2 strings in this line
def Calculatewages():
wage = (work*hours) # <------ here
return wage
To fix this issue you must cast them into int
and then your code should run without problems.
hours = int(input("Please enter your work hours: ")) # < ---- Cast to int
work = int(input("Please enter your hourly rate: ")) # < ---- Cast to int
state = input("Please enter your state of resident: ")
status = input("Please enter your marital status: ")
My output:
Please enter your work hours: 8
Please enter your hourly rate: 10
Please enter your state of resident: IN
Please enter your marital status: Single
**********
Your wage is: $ 80
Your federal tax is: $ 20.0
Your state tax is: $ 4.0
Your net wage is: $ 56.0
you can also use string's format() method:
print("Your wage is: $".format(wag))
print("Your federal tax is: $".format(FederalTax))
print("Your state tax is: $".format(StateTax))
print("Your net wage is: $".format(Net))
edited Nov 15 '18 at 8:00
hhaefliger
29712
29712
answered Nov 15 '18 at 7:21
Vineeth SaiVineeth Sai
2,52171425
2,52171425
Oh ok I get it now, but do you know how to get rid of the space between$
and the output number?
– H. Khan
Nov 15 '18 at 7:43
@H.Khan Remove the$
from the print statement.print "Your net wage is: ", wag
like this
– Vineeth Sai
Nov 15 '18 at 7:45
Sorry I meant have it output$20
instead of$ 20.0
– H. Khan
Nov 15 '18 at 7:48
Here's how you can do that,print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
add a comment |
Oh ok I get it now, but do you know how to get rid of the space between$
and the output number?
– H. Khan
Nov 15 '18 at 7:43
@H.Khan Remove the$
from the print statement.print "Your net wage is: ", wag
like this
– Vineeth Sai
Nov 15 '18 at 7:45
Sorry I meant have it output$20
instead of$ 20.0
– H. Khan
Nov 15 '18 at 7:48
Here's how you can do that,print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
Oh ok I get it now, but do you know how to get rid of the space between
$
and the output number?– H. Khan
Nov 15 '18 at 7:43
Oh ok I get it now, but do you know how to get rid of the space between
$
and the output number?– H. Khan
Nov 15 '18 at 7:43
@H.Khan Remove the
$
from the print statement. print "Your net wage is: ", wag
like this– Vineeth Sai
Nov 15 '18 at 7:45
@H.Khan Remove the
$
from the print statement. print "Your net wage is: ", wag
like this– Vineeth Sai
Nov 15 '18 at 7:45
Sorry I meant have it output
$20
instead of $ 20.0
– H. Khan
Nov 15 '18 at 7:48
Sorry I meant have it output
$20
instead of $ 20.0
– H. Khan
Nov 15 '18 at 7:48
Here's how you can do that,
print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Here's how you can do that,
print "Your net wage is: $".format(wag)
– Vineeth Sai
Nov 15 '18 at 7:50
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
Ok great, that worked lol
– H. Khan
Nov 15 '18 at 7:53
add a comment |
If you're running under python3.x, then with your code, it should print out without the parenthesis, and if you're running under python2.x, then to get rid of the parenthesis, you might wanna try:
print "Your wage is: $", wag
add a comment |
If you're running under python3.x, then with your code, it should print out without the parenthesis, and if you're running under python2.x, then to get rid of the parenthesis, you might wanna try:
print "Your wage is: $", wag
add a comment |
If you're running under python3.x, then with your code, it should print out without the parenthesis, and if you're running under python2.x, then to get rid of the parenthesis, you might wanna try:
print "Your wage is: $", wag
If you're running under python3.x, then with your code, it should print out without the parenthesis, and if you're running under python2.x, then to get rid of the parenthesis, you might wanna try:
print "Your wage is: $", wag
answered Nov 15 '18 at 7:24
Lingchao CaoLingchao Cao
24348
24348
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314182%2fhow-to-get-rid-of-the-parenthesis-and-comma-in-my-output%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did it successfully run? How do you know there is paranthesis and comma in output without actually seeing the output?
– Austin
Nov 15 '18 at 7:24
1
You think you're on Python 3, but that output says you're not.
– user2357112
Nov 15 '18 at 7:27
@Austin I ran it on c9.io which is a website my teacher provided, and it works, but just has parenthesis, commas, and quotation marks for some weird reason
– H. Khan
Nov 15 '18 at 7:39