filmov
tv
Exercise - 8. b) How to generate random names in Python ?

Показать описание
We are going to solve the below exercises in Python :
1) Write a function to calculate the number of occurrences of a particular string in a list or array of string:
st = ["hi", "Hi", "hello", "how", "HI", "Hello", "abc", "wxyz", "hi"]
2) Generate random names of 10 people with First Name and Last name.
Note : First Name has max 5 characters & last Name has max 10 characters
3) Generate around 100 genuine names (Full Names) from 10 randomly generated First Names and 10 randomly generated Last Names.
Timestamps:
0:00 Introduction
0:16 How to write Python script in RStudio ?
2:32 How to convert a string to lower case in Python ?
3:08 How to convert a string to upper case in Python ?
3:20 How to capitalize a word or string in Python ?
3:55 Create a for loop
4:08 Create an empty list in python
4:28 How to append a list in python ?
4:55 How to count the number of occurrences of a particular word in Python ?
5:15 Create a case insensitive function in Python to count occurrences of a word
8:24 how to install a library in Python ?
8:57 Import a library in Python
9:03 Generate random first names in Python
9:37 Generate random last names in Python
9:43 Generate random full names in Python
11:33 How to generate around 100 random names using 10 first names and 10 last names ?
13:44 import random library in Python
14:16 How to randomly pick a name from a list of names ?
19:43 How to check the number of elements in a list ?
This tutorial is part of the below playlist "Excel in R and Python":
This tutorial is also part of the playlist "Coding Challenge" which tests your coding skills in R and Python:
1) Write a function to calculate the number of occurrences of a particular string in a list or array of string:
st = ["hi", "Hi", "hello", "how", "HI", "Hello", "abc", "wxyz", "hi"]
2) Generate random names of 10 people with First Name and Last name.
Note : First Name has max 5 characters & last Name has max 10 characters
3) Generate around 100 genuine names (Full Names) from 10 randomly generated First Names and 10 randomly generated Last Names.
Timestamps:
0:00 Introduction
0:16 How to write Python script in RStudio ?
2:32 How to convert a string to lower case in Python ?
3:08 How to convert a string to upper case in Python ?
3:20 How to capitalize a word or string in Python ?
3:55 Create a for loop
4:08 Create an empty list in python
4:28 How to append a list in python ?
4:55 How to count the number of occurrences of a particular word in Python ?
5:15 Create a case insensitive function in Python to count occurrences of a word
8:24 how to install a library in Python ?
8:57 Import a library in Python
9:03 Generate random first names in Python
9:37 Generate random last names in Python
9:43 Generate random full names in Python
11:33 How to generate around 100 random names using 10 first names and 10 last names ?
13:44 import random library in Python
14:16 How to randomly pick a name from a list of names ?
19:43 How to check the number of elements in a list ?
This tutorial is part of the below playlist "Excel in R and Python":
This tutorial is also part of the playlist "Coding Challenge" which tests your coding skills in R and Python: