黄金猫 发表于 2021-8-24 19:52:10

p新004作业

0.yes,can not use 'input' as variable
1.?
2.?
3.can't compare
4.x, 123256,123123123,3

0.fishc=
r''''
      ___                     ___          ___          ___   
   /\\         ___       /\\      /\__\      /\\   
    /::\\       /\\   /::\\      /://       /::\\   
   /:/\:\\      \:\\   /:/\ \\    /:/__/       /:/\:\\
/::\~\:\\   /::\__\ _\:\~\ \\/::\\ ___/:/\:\\
/:/\:\ \:\__\ __/:/\/__//\ \:\ \ \__\/:/\:\/\__\/:/__/ \:\__\
\/__\:\ \/__//\/://   \:\ \:\ \/__/\/__\:\/://\:\\\/__/
      \:\__\\::/__/   \:\ \:\__\       \:://\:\\      
       \/__/   \:\__\      \:\/://       /://    \:\\   
                \/__/       \:://       /://      \:\__\   
                           \/__/      \/__/      \/__/
'''
1.'i*j=',i*j


1-1:use r'code'
1-2:three quote word string.
1-4.4:结果:报错,解析:目前 Python 的字符串类型只支持加法拼接和乘法复制,不支持减法或者除法。

1.>>> for i in range(1, 10):
...   for j in range(1, i+1):
...         print(i, "x", j, "=", i * j, end=' ')
...   print("\n")

柿子饼同学 发表于 2021-8-24 20:07:32

{:10_275:}
页: [1]
查看完整版本: p新004作业