<Problem> I'm going to place an order. You can order by entering the product name, price, and purchase quantity. Examples of outputs are as follows. (However, the price of the product does not exceed 99999 won.)
[Input example 1]
apple
6000
3
[Example 1]
The price of apple is 06000 Won
You ordered appleappleapple
The problem is the top. In my case, I applied this code, but should I use the conditional statement? And I don't know how to express 6000 in five digits.
It's my code.
a=input()
b=int(input())
c=int(input())
print("The price of %s is %d Won" %(a, b))
print("You ordered %s" %(a*c))
I don't know how to use if or how to express five digits. I look forward to hearing from you!
python
How to express 6000 in five digits using conditional statements
What if the number "if" is less than 10? → Since it is a number of digits of work, if you put the number after → 0000 and show it, → 5 digits
What if the number "else" is less than 100? → Since it is a decimal place, if you put the number after → 000 and show it, → 5 digits
What if the number "else" is less than 1000? → Since it is a hundred digits, if you put the number after → 00 and show it, → 5 digits
What if the number "else" is less than 10000? → Since it is a number of digits in the cloth, if you put the number after → 0 and show it, → 5 digits
What if the number "else" is less than 100000? → Since it's a unique number of digits → If you just show it, it'll be 5 digits
60? Here, the number "If" (if) → → Jared Lee Gosselin because it is less than 10000
PS. If you just want to get the right answer after skipping the basic course? https://stackoverflow.com/a/339013/8680764
573 PHP ssh2_scp_send fails to send files as intended
590 GDB gets version error when attempting to debug with the Presense SDK (IDE)
567 Understanding How to Configure Google API Key
862 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
564 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.