CS 271: Module 1: Python Basics Part 2 (1.5 Points)
Developed by Professor Tralie and Professor Mongan.Exercise Goals
The goals of this exercise are:- To use slicing notation in python
- To apply string concatenation in python
One thing I find myself doing all the time is converting formats of multimedia data with python scripts. Part of this is just getting the file paths correct. Let's say I wanted to convert an image file with a .jpg format to a .png format. Write the code comes up with the correct .png target filename using string slices and string concatenation. Hint: You can use a negative index as the end of a slice.
Welcome to our online modules system!
Be sure to log in with your Urinus ID
before you proceed.
For example, Professor Tralie's ID is ctralie.
If you are not an Ursinus student, that's fine!
Just make something up, and you can still run everything