- Create a new repo using this repo template.
- Clone the repo to your machine or use the codespaces.
- Code the submission in your repo and push all changes.
- Submit the repo link in the submission form
An IPv4 address is a numeric identifier that a device uses to communicate on the internet, akin to a postal address in the real world, typically formatted in dot-decimal notation as #.#.#.#
. But each #
should be a number between 0
and 255
, inclusive. Suffice it to say 275
is not in that range! If only NUMB3RS had validated the address in that scene!
In a file called assignment1.py
, implement a function called validate
that expects an IPv4 address as input as a str
and then returns True
or False
, respectively, if that input is a valid IPv4 address or not.
NOTE :
Structure assignment1.py
as in the assignment1.py , wherein you’re welcome to modify main
and/or implement other functions as you see fit, but you may not import any other libraries. You’re welcome, but not required, to use re
and/or sys
In a file named assignment2.py, implement a function called extract_insta_id
that takes a URL of an Instagram profile as input (a string) and returns the Instagram username or ID. The function should extract the username
or ID
from the provided URL.
NOTE :
Structure assignment3.py
, wherein you're welcome to modify the main
function and/or implement other functions as you see fit, but you may not import any other libraries. You're welcome, but not required, to use re
and/or sys
.
In a file called assignment3.py
, implement a function called count
that expects a line of text as input as a str
and returns, as an int
, the number of times that “um” appears in that text, case-insensitively, as a word unto itself, not as a substring of some other word. For instance, given text like hello, um, world
, the function should return 1. Given text like yummy
, though, the function should return 0
.
NOTE :
Structure assignment3.py
, wherein you’re welcome to modify main
and/or implement other functions as you see fit, but you may not import any other libraries. You’re welcome, but not required, to use re
and/or sys
Contact [email protected] for more info.