# data[].attributes.body
# Keep asking for the user's age until a non-negative number is entered

while True:

age = int(input("Enter your age: "))

if age < 0:

print("Age cannot be negative. Please try again.")

else:

break # Exit loop when a valid age is entered

# Display the valid age

print(f"Your age is: {age}")

# data[].attributes.body
# Keep asking for the user's age until a non-negative number is entered

while True:

age = int(input("Enter your age: "))

if age < 0:

print("Age cannot be negative. Please try again.")

else:

break # Exit loop when a valid age is entered

# Display the valid age

print(f"Your age is: {age}")

# data[].attributes.body
from sklearn.preprocessing import StandardScaler
# Create scaler
import numpy as np

heightSet = np.array([[170], [170], [165], [164], [168]])
scaler = StandardScaler()

standardized_data = scaler.fit_transform(heightSet)

print(standardized_data)

from sklearn.preprocessing import MinMaxScaler
import numpy as np

heightSet = np.array([[170], [170], [165], [164], [168]])
#heightSet=[170,170,165,164,168]
scaler = MinMaxScaler(feature_range=(-1, 1))
normalized = scaler.fit_transform(heightSet)

print(normalized)

# data[].attributes.attachment_link.description
Practical data skills you can apply immediately: that's what you'll learn in these free micro-courses. They're the fastest (and most fun) way to become a data scientist or improve your current skills.