Level 1: Calculate the area of a square with integer side lengths
Task Description
Task for this level: Write a small program that can calculate the area of a square.
Relevant knowledge
In order to complete the task of this level, you need to master:
1. Input function
2. String to integer
3. Numerical operation
4. Output function
Level 2: Calculate the area of a square whose side length is a floating-point number
Task Description
Task for this level: Write a small program that can calculate the area of a square.
Relevant knowledge
In order to complete the task of this level, you need to master:
1. Input function
2. String to floating point number
3. Numerical operation
4. Output function
Level 3: Calculate the area of a square, and the result data type is consistent with the input
Task Description
Task for this level: Write a small program that can calculate the area of a square.
Relevant knowledge
In order to complete the task of this level, you need to master:
1. Input function
2. String to computable expression
3. Numerical operation
4. Output function