+ 1

Here if I want to add B and percent how should I do it ? It is always coming wrong because iteger can't be added with variable.

https://code.sololearn.com/c9OlyvSu89Tc/?ref=app

2nd Feb 2022, 12:46 PM
Ishaan9090
Ishaan9090 - avatar
8 Respuestas
0
?? print(A+B) print(A%B)
2nd Feb 2022, 1:19 PM
Jayakrishna 🇮🇳
0
What do you want to say bro? I am not getting the required result
2nd Feb 2022, 2:30 PM
Ishaan9090
Ishaan9090 - avatar
0
I mean, Question is not clear to me! It you want add B means print(A+B) ? Persent means print(A%B)? What do you mean by " Because integer can't be added with variable"? Ishaan9090 add a sample expected output for example....!
2nd Feb 2022, 3:33 PM
Jayakrishna 🇮🇳
0
I am telling that in the program I want to make a tip calculator in which I want to make(for ex. 100 +"%")The result should be 100 % displayed together.Whatever the total amout the viewer will enter,with the percentage of the amount we want to give,the amout should come with"₹ rupees" symbol and percentage with "%" symbol.But they should be outputed together
3rd Feb 2022, 6:46 AM
Ishaan9090
Ishaan9090 - avatar
0
It should come like for example: 100% And ₹whatever it is
3rd Feb 2022, 6:52 AM
Ishaan9090
Ishaan9090 - avatar
0
Convert all to str types, while printing.. Or use camma separate values in print.
3rd Feb 2022, 11:12 AM
Jayakrishna 🇮🇳
0
A=int(input()) print("Total bill:",'₹'+str(A)) B=int(input()) print("Percentage of the bill you want to give to the waiter:", str(B)+'%', "percent") C=(A * B) print("Multiplied the amount to the percent: ") print('₹'+str(C)) D=(C//100) print("Amount you will give to the waiter:") print('₹'+str(D))
3rd Feb 2022, 11:13 AM
Jayakrishna 🇮🇳
0
Ok
4th Feb 2022, 3:19 AM
Ishaan9090
Ishaan9090 - avatar