roster[50] is an array of "students", so roster[9] is a "student". Therefore, roster[9].name is a string.
num = int(input("Enter a number: "))
i = 2
while num > 1:
if num % i == 0:
num = num / i
print(i, end=" ")
i = 2
i += 1
I hope this helps!
When a website takes in personal information from a user, the owners of the website have no idea what was input, no matter how hard they tried. The information is not stored, and is used by Javascript APIs to locate your address to either ensure that it is valid, or so that you can choose your address.
It's completely safe, and if a website looks really, really sketchy, then just don't give them anything personal.
Another way to identify if a website is safe to give your personal information to is if you see "HTTPS" in the URL at the top of your browser. This means Hyper Text Transfer Protocol Secure, and is the protocol used to transfer information over the internet SECURELY, via encryption that only computers are able to decrypt, and will not show that information to owners of the server/website.
Answer:
def calculate_pay(total_worked_hours, rate_per_hour):
if total_worked_hours > 40:
return (40 * rate_per_hour) + ((total_worked_hours - 40) * 2 * rate_per_hour)
else:
return total_worked_hours * rate_per_hour
Explanation:
- Create the calculate_pay function that takes 2 parameters.
- Inside the function check whether the total_worked_hours is greater than 40 and then return the pay by calculating with the help of formula for work over 40 hours.
- Otherwise return the pay by multiplying the total_worked_hours with rate_per_hour.