学 Python,告别“不浪漫罪名”!女朋友想要星星,小明就给她星星,女朋友收到后非常满意。下列哪项是小明写的正确的代码()。
A. number = int(input("How many stars do you want?"))for i in range(1, number):print('*', end=' ')
B. number = int(input("How many stars do you want?"))for i in range(number):print('*', end=' ')
C. number = int(input("How many stars do you want?"))for i in range(number):print('*', end=' ')
D. number = int(input("How many stars do you want?"))for i in range(1, number):print('*', end=' ')