0
Is it possible to get another output in string?
x=int(7) print(x) y=int(input()) print(y) z=(float(x)*int(y)) print(z) After inputting your "y value", is it still possible get z as a float string value? Like, is that even possible?
5 Answers
0
Try it on the playground,..
By adding,
print(str(z))
0
What if I want to add quotation marks (") to the output of z?
0
Jayakrishnađźđł because, since it's now a string output, I should be able to add quotation marks, right??
0
No.
If z="hello"
print(z)
print("z")
Output is :
hello
z
"", or ' ' are used to create a string...
Like
"world" =>is a string
but without quotes,
world => is a variable can hold a value..
0
Jayakrishnađźđł
Alright. Thanks man.
I was already thinking of escaping the quotations (\") to make that possible.
But thanks for clearing that up.