Convert Algorithm into basic python code using correct syntax:

1) get hours worked
2) get pay rate
3) if hours worked < 40
3.1) gross pay = pay rate times hours worked
4) else
4.1) gross pay = pay rate times 40 plus 1.5 times pay rate (hours worked minus 40)
5) Display gross pay

1: Number of students (21)

2: Number of males (9)
3: Number of females (12)
4: Percent of male (9/21 = 43%)
5: Percent of female (12/21 = 57%)

Step 1: Number of students (21)

Step 2: Number of males (9)

Step 3: Number of females (12)

Step 4: Percent of male (9/21 = 43%)

Step 5: Percent of female (12/21 = 57%)

Here's an example of how you can convert the given algorithm into basic Python code using the correct syntax:

```python
# Step 1: Get hours worked
hours_worked = float(input("Enter the number of hours worked: "))

# Step 2: Get pay rate
pay_rate = float(input("Enter the pay rate: "))

# Step 3: Check if hours worked is less than 40
if hours_worked < 40:
# Step 3.1: Calculate gross pay
gross_pay = pay_rate * hours_worked
else:
# Step 4: Calculate gross pay for overtime
overtime_hours = hours_worked - 40
overtime_pay = 1.5 * pay_rate
regular_pay = pay_rate * 40
gross_pay = regular_pay + (overtime_hours * overtime_pay)

# Step 5: Display gross pay
print("The gross pay is:", gross_pay)
```

In this code, we use the `input` function to get the user's input for hours worked and pay rate. Then, we use an `if` statement to check if the hours worked is less than 40. If it is, we calculate the gross pay using the pay rate multiplied by the hours worked. Otherwise, if the hours worked is greater than or equal to 40, we calculate the gross pay by adding the regular pay (pay rate times 40) to the overtime pay (1.5 times the pay rate for each hour over 40). Finally, we use the `print` function to display the gross pay.