Complete the following exercises using the code and concepts from workshop_2. All work should be committed to your GitHub repository that you created in Homework 1.
- Create a Python script that defines at least three variables using proper naming conventions (as shown in
naming_convention.py). - Print their values using string formatting.
- Use meaningful variable names that describe their purpose.
- Create a script that demonstrates the conversion between different data types (int, float, str).
- Show examples of type casting similar to those in
type_casting.py. - Include examples with rounding numbers.
- Create a script that demonstrates different string creation methods (single quotes, double quotes, multi-line).
- Use escape characters and string operations.
- Print the length of different strings as demonstrated in
strings.py.
- Write a script that calculates and displays the average of three numbers.
- Use the approach shown in
workshop_2/average.py. - Format the output to display the average with 2 decimal places.
- Create a script that asks the user for their name and age using the input() function.
- Convert the age input to an integer as shown in
input_basics.py. - Print personalized output using the collected information.
- Create a folder named
homework_2in your GitHub repository. - Create separate
.pyfiles for each exercise (5 files total). - Include meaningful comments in your code explaining your logic.
- Make sure to commit and push your changes to GitHub.
- Test all your scripts to ensure they work as expected.
- Proper use of Python syntax and naming conventions
- Correct implementation of type casting
- Effective string manipulation techniques
- Proper handling of user input
- Code organization and readability
- Following the submission guidelines