# | Problem | Pass Rate (passed user / total user) |
---|---|---|
14230 | String computation |
|
14234 | Begin Your Self-Introduction |
|
14236 | Confirm Your Meal |
|
Description
This is Advanced Question for HW1.
Write a program that calculates the value of the input string.
Hint: You may need to use "if" and "split()" to solve the problem.
Input
Given a line of input containing a string including:
The operand will be a combination of numbers and alphabets.
The operator will be one of {+, -, *, /, %}.
Output
Please ignore the alphabets and do the calculation. The output is to print the formula and the answer.
Note that '/' should be rounded down to the nearest whole digit.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Create a program that takes a person's name, age, and hobby as input and outputs a formatted self-introduction of the person.
Input
A line of input containing the person's name, age, and hobby.
Output
Two lines describing the person in the following format:
- Line 1: "Hello, my name is {Name}. I am {Age} years old."
- Line 2: "My hobby is {Hobby}."
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Create a program that takes the quantity of steaks, pasta, and salads ordered and outputs the order in the format.
Input
Three lines of input, each containing the quantity of steaks, pasta, and salads ordered.
Line 1: quantity of Steak
Line 2: quantity of Pasta
Line 3: quantity of Salad
Output
A single line indicating the order, formatted as "YOUR MEAL: {items}", where {items} is a list of the ordered items concatenated by "!" and each is repeated the number of times based on the quantity ordered.