2961 - 2024GEC1506 - HW1 Scoreboard

Time

2024/03/12 00:00:00 2024/03/17 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14230 String computation
14234 Begin Your Self-Introduction
14236 Confirm Your Meal

14230 - String computation   

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:

operand1operatoroperand2

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.

operand1(without alphabets) operator operand2(without alphabets)

Note that '/' should be rounded down to the nearest whole digit.

Sample Input  Download

Sample Output  Download

Tags




Discuss




14234 - Begin Your Self-Introduction   

Description

Create a program that takes a person's nameage, and hobby as input and outputs a formatted self-introduction of the person.

Input

A line of input containing the person's nameage, 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




14236 - Confirm Your Meal   

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.

Sample Input  Download

Sample Output  Download

Tags




Discuss