top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

A Simple Email splitter and Die Roller

This are easy python functions that serve as apps, easy to follow through and implement. it basically requests for your username and returns the username and domain name after calling the function.


I used the input() function to request for the email to be split and store the result in a variable called email.

After storing the email successfully, I defined a function that takes that email as an argument and splits it into the username and domain name, then displays both in a nice format.

then finally we call the function to see how well our app works


the second simple app i chose is:


A die roller;


This simple python app simulates the rolling of a fair die anytime it is called. A die can give any number from 1 to 6, so I defined the sample space as a variable die.

I then created a roll die function that uses numpy random module to chose one of the numbers and display it as the number gotten anytime the die is rolled.



0 comments

Recent Posts

See All
bottom of page