Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
The given program defines a function printBill(), which takes one string argument and outputs formatted text. You need to take
My code Def printBill(text) Print("=====") Print(text) Print("=====") PrintBill(text=int(input())) It's just work for 1 chase, please help me find the error
33 Respostas
+ 6
Mabey cause it says it takes a string and you supply it with an int. It gives you an example in the problem itself
+ 4
Try this one:
-Add a colon after you define your function
-The last line don't overthink because the user can enter either an integer or a string so change it with printBill(input())
Your final code should look like this
def printBill(text):
print("======")
print(text)
print("======")
printBill(input())
+ 3
Your question got cut off.
+ 2
Syekh Guntur Amara Putra ,
if you really have a problem, you should put a bit more effort. we need some more details from you:
āŖļøgive a clear and complete description about your task
āŖļøif your question is related to an exercise in a tutorial, please mention the tutorial name and the lesson number
āŖļøif there are error messages please post them here
āŖļøgive at least one sample with input data and the expected output
āŖļøto be able to find out the issues you have, we need to see your code
Ā Ā Ā => please put your code in playground, save it there and post a link to it here.
thanks for your understanding!
+ 2
Why so many wrong answer please correct it and bro improve your syntax there are some many errors.
def printBill(text):
print("======")
print(text)
print("======")
printBill(text=input())
and get your nice output.
Just chill
+ 2
Well took almost a day to solve this , but this is how itās done-
def printBill(text):
text = str(text)
print(ā=====ā)
print(text)
print(ā=====ā)
text=input()
printBill(test)
+ 1
def printBill(text):
print("======")
print(text)
print("======")
printBill(input())
done...!
+ 1
def printBill(text):
print("======")
print(text)
print("======")
printBill(input())
+ 1
Both are correct
0
Slick
The given program defines a function printBill(), which takes one string argument and outputs formatted text.
You need to take the user input and call the function by passing the input as its argument.
That the question
0
ā¤ā¢ā šš¢š¢ššØ šš”šš²šš„ āā¢ā¤
I don't know what's wrong with my code
0
We don't know what's wrong either, please provide an example input and output.
0
Slick it's hidden chase, I can't see.
I stuck in basic pyhton on argument point 38.2 can u help me sir?
0
We can help, but we need more info. Test cases do not matter. If you understand the problem, then please give us some input and output examples so we can understand what's wrong in your code.
0
The given program defines a function printBill(), which takes one string argument and outputs formatted text.
You need to take the user input and call the function by passing the input as its argument.
You need to only call the function, as it will take care of the output.
That the question
And this my code
def printBill(text):
print("======")
print(text)
print("======")
printBill(text=int(input()))
This the results for chase 1
Input 428977
Your output
=====
428977
=====
Expected output
=====
428977
=====
It's just work for chase 1, but not for another chase, there are 3 chase
0
Slick ā¤ā¢ā šš¢š¢ššØ šš”šš²šš„ āā¢ā¤ thx u for helping me
0
Because thats not how
Parameters work in Python,
Do like:
def printBill(text):
print("======")
print(text)
print("======")
printBill("something")
0
def printbill(text):
print("===")
print(text)
print("===")
s=input()
printbill(s)
0
This is the correct answer:
def printBill(text):
print("======")
print(text)
print("======")
printBill(input())