construct a python program to A taxi driver charges the bill as follows. On a fine day, Mr. Roy travels to his office by the taxi. Write a Python program to accept the kilometers traveled by Mr. Roy and calculate his taxi bill.
Find the sum of the first 10 numbers that are divisible by 3 and 9.
Sample Output
495
1) Write a Python program that prints all the numbers from 11 to 20 except 13 and 17 using For loop.
https://we.tl/t-AYbqXOvbk2
How to develop model in python?
Write short note on following:
a) How to create One-dimensional array?
b) How to identify datatype for numpy array?
Multiply 8 with 4, and print the result.
a. Display this to the console:
Bananas: $0.50 each
Strawberries: $.75 each
b. Ask the user what they want to purchase. They will type an 'b' for bananas or an 's' for strawberries.
c. Your program will then ask for the number of bananas or strawberries they wish to purchase (depending on which they selected). The number of bananas cannot exceed 20 and the number of strawberries cannot exceed 10. If the user input exceeds these maximums your program should exit.
d. Your program should then print a report to the console like the following:
Item Qty Price Total
--------------------------
Bananas 4 $0.50 $2.00
Tax(15%): $0.30
Total Cost: $2.30
e. Ask the user for the amount tendered (the amount of money given for the payment). If the amount tendered is over $100 tell the user that there isn't enough change for such an amount and exit.
f. Finally, your program should print another report to the console like the following:
Amount tendered: $10
Change: $7.70
Thank you for shopping with SAI!
by CodeChum Admin
To give you more of a challenge with a number's digits, let's try counting how many of a certain digit is present on a given number.
Let's start coding!
Instructions:
Input
A line containing two integers separated by a space.
2·124218
Output
A line containing an integer.
2
by CodeChum Admin
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
Input
A line containing an integer.
214
Output
A line containing an integer.
4