Discuss / Python / 作业

作业

Topic source

Sayiod

#1 Created at ... [Delete] [Delete and Lock User]
# -*- coding: utf-8 -*-

#请利用循环依次对list中的每个名字打印出Hello, xxx!:
L = ['Bart', 'Lisa', 'Adam']

for a in L:
    print('Hello, %s!' %a)

#请试写一个死循环程序
i = 1
while i>0:
    print(i)

  • 1

Reply