Input, Output & Comments
✕Output and Formatting
Question 1 of 2
- Ask user for name and price of a pen. display in format:
Ram bought a pen for $ 10.56 - Ask user for name, price of three product. Display it in format as:
Item Price -------------------- Apple Rs. 3 Banana Rs. 10 Orange Rs. 200Note: Item is left aligned with width of 12 and price is right aligned with width of 3 - Ask user for current year, month and day. Display it in format:
Today's Date: 2023-03-12 - Ask user for name and marks in 3 subject. Display result as:
Hari scored 85.5% in exam.
- Ask user for name and price of a pen. display in format:
User Input
Question 2 of 2
- Ask user for his/her name and display:
Hello, <name>! - Ask user for his/her
birth year. Calculate and display his/her age - Ask user for
massandlengthof a cube. Calculate and display itsdensity(d = m/v) - Ask user for length in feet and convert and display its value in meter (
1 ft=0.3048 m) - Ask user for a file name in format
file.ext. Extract and display file extension from it - Ask user for a sentence and display number of words in it.
- Ask user for two numbers and display their
sum,difference,productandquotient. Note: Output displayed should be in proper human interpretable format not just number
- Ask user for his/her name and display:
