0% found this document useful (0 votes)
3 views

M2C3 Python Assignment

The M2C3 Python Assignment requires students to complete various exercises to practice their Python skills. Tasks include creating variables of different data types, manipulating strings and lists, and using string interpolation. Completion of this assignment is necessary to pass the coursework section.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

M2C3 Python Assignment

The M2C3 Python Assignment requires students to complete various exercises to practice their Python skills. Tasks include creating variables of different data types, manipulating strings and lists, and using string interpolation. Completion of this assignment is necessary to pass the coursework section.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

M2C3 Python Assignment

During the first section of Module 2, you have learned all about Python. Python is a powerful
programming language that serves a lot of purposes. To practice what you have learned in this
section, you will complete some Python exercises. You may use Visual Studio Code, Repl.it, or
another text editor/environment of your choice. Please complete the following assignment and
reach out on the Support App to have a mentor review your work. If you have any questions or
need any help, please reach out so we can help you! This assignment must be completed to
pass this section of the coursework.

*Concepts included

Exercise 1: Create a string, number, list, and boolean, each stored in their own variable.

Exercise 2: Use an index to grab the first 3 letters in your string, store that in a variable.

Exercise 3: Use an index to grab the first element from your list.

Exercise 4: Create a new number variable that adds 10 to your original number.

Exercise 5: Use an index to get the last element in your list.

Exercise 6: Use split to transform the following string into a list.


names = 'harry,alex,susie,jared,gail,conner'

Exercise 7: Get the first word from your string using indexes. Use the upper function to
transform the letters into uppercase. Create a new string that takes the uppercase word and the
rest of the original string.

Exercise 8: Use string interpolation to print out a sentence that contains your number variable.

Exercise 9: Print “hello world”.

You might also like