0% found this document useful (0 votes)
2 views2 pages

Assignment Python Colab

This assignment focuses on practicing Python basics and Google Colab features through a structured notebook. It includes tasks such as creating variables, performing operations, using control structures, defining functions, formatting text, and installing libraries. An optional challenge section is also provided for additional practice.

Uploaded by

berryrose616
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Assignment Python Colab

This assignment focuses on practicing Python basics and Google Colab features through a structured notebook. It includes tasks such as creating variables, performing operations, using control structures, defining functions, formatting text, and installing libraries. An optional challenge section is also provided for additional practice.

Uploaded by

berryrose616
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment1: My First Python Notebook

This assignment will help you practice Python basics and Google Colab features. You will write
code, use markdown, and explore libraries in an organized Colab notebook.

1. Title & Introduction (Markdown)


- Add a title using `#`

- Write a short introduction (2-3 lines) about what the notebook will demonstrate

2. Basic Python Operations (Code Cells)


Tasks:

- Create variables of different types: integer, float, string, and list

- Perform and print:

- - Basic arithmetic operations

- - String concatenation and slicing

- - List operations (add, remove, sort)

3. Control Structures
- Write a loop to print numbers from 1 to 10

- Use a loop to print each character in a string

- Write an if-else block to check if a number is even or odd

4. Functions
- Write a function to return the square of a number

- Write a function that accepts a list and returns only even numbers

5. Text Cell Formatting (Markdown)


- Add a subheading using `##`

- Use **bold**, *italics*, and bullet points

- Write a math formula using LaTeX: e.g., `E = mc^2`

6. Installing and Importing Libraries


- Use `!pip install` to install a package like numpy or pandas

- Use `import` to load the library and demonstrate a basic usage:


Example:

import numpy as np
arr = np.array([1, 2, 3])
print(arr * 2)

7. Challenge Section (Optional)


- Count the number of vowels in a given string

- Find the largest number in a list without using built-in functions

You might also like