Welcome to Ed2Ti Blog.

My journey on IT is here.

Professor: Iyad Koteich

You are organizing a party for your group of students.

  1. Check how many students are interested
  2. You are limited to accept 20 students only

Make a Python program that will choose 20 randomly out of All interested students

import pandas as pd
import numpy as np
df = pd.read_csv("class.csv")
df.head()
data = df.values
array = np.random.choice(16, 10)
array = np.array(array)
for i in array:
    print(data[i][3])

I did an adaptation to attend calss.csv file.

You can find all code at https://github.com/ed2ti/exercise01