+ 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

7th Sep 2021, 10:41 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
35 Réponses
+ 7
Mabey cause it says it takes a string and you supply it with an int. It gives you an example in the problem itself
7th Sep 2021, 11:05 AM
Slick
Slick - avatar
+ 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())
19th Oct 2021, 5:41 PM
Burak Genc
+ 3
Your question got cut off.
7th Sep 2021, 10:46 AM
Slick
Slick - avatar
+ 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!
7th Sep 2021, 10:59 AM
Lothar
Lothar - avatar
+ 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
21st Feb 2022, 12:26 PM
Ayush
Ayush - avatar
+ 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)
15th Jul 2023, 10:19 PM
TanishA
TanishA - avatar
+ 1
def printBill(text): print("======") print(text) print("======") printBill(input()) done...!
6th Mar 2022, 2:40 PM
Nikhila
+ 1
def printBill(text): print("======") print(text) print("======") printBill(input())
30th Mar 2022, 3:33 PM
AH Zamiya Banu-s92064750-221424750
+ 1
Both are correct
8th Oct 2023, 5:26 PM
Ayush
Ayush - avatar
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
7th Sep 2021, 10:54 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
7th Sep 2021, 10:55 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
0
We don't know what's wrong either, please provide an example input and output.
7th Sep 2021, 10:56 AM
Slick
Slick - avatar
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?
7th Sep 2021, 10:59 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
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.
7th Sep 2021, 11:01 AM
Slick
Slick - avatar
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
7th Sep 2021, 11:02 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
0
Slick Lothar I don't know what's wrong with my code
7th Sep 2021, 11:03 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
7th Sep 2021, 11:12 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
0
Because thats not how Parameters work in Python, Do like: def printBill(text): print("======") print(text) print("======") printBill("something")
7th Sep 2021, 8:47 PM
underscore
underscore - avatar
0
def printbill(text): print("===") print(text) print("===") s=input() printbill(s)
8th Sep 2021, 1:56 PM
Abhishek Kumar
Abhishek Kumar - avatar
0
This is the correct answer: def printBill(text): print("======") print(text) print("======") printBill(input())
17th Sep 2021, 9:32 PM
Geo