A i think idk im trying to earn points
I. is syntactically correct if genderString exists. if genderString, for example, is "Male", then char gender would be the character at index 0 (the first character), meaning 'M'.
II. is incorrect. It is using the comparison operator (==) instead of the assignment operator (=). It is also setting a boolean variable to a String value of 'F'. Boolean values cannot hold string values, and can only hold true & false.
III. is correct if ageString only contains numbers (presumably, it does, as it's called ageString). Integer.parseInt is a function that converts String values to integer values if the string values only contain numerical characters.
The answer in this case should be B. II only.
Answer:
Nope
Explanation:
You can use open office for free
import random
nums = [x for x in range(50,100) if x%2!=0]
print(random.choice(nums))
We use a list comprehension to create a list of the odd numbers between 50 and 99. Then we randomly choose one of those numbers using the random module.