题解 | #多行输出#
https://www.nowcoder.com/practice/952cf4f03d3a4831a175c3415778c87b
功能:多行输出
思路:
首先将两个字符串分别存储到变量str1和str2中
然后使用两个print语句分别将以上两个变量在屏幕上打印出来
步骤:
STEP1 将字符串 'Hello World!'存储到变量str1中,并将字符串'Hello Nowcoder!' 存储到变量str2中
STEP2 使用print语句打印变量str1
STEP3 使用print语句打印变量str2
考查知识点:print()输出。print()输出默认换行,如果要实现不换行,需要在变量后边加上end=""
思路:
首先将两个字符串分别存储到变量str1和str2中
然后使用两个print语句分别将以上两个变量在屏幕上打印出来
步骤:
STEP1 将字符串 'Hello World!'存储到变量str1中,并将字符串'Hello Nowcoder!' 存储到变量str2中
STEP2 使用print语句打印变量str1
STEP3 使用print语句打印变量str2
考查知识点:print()输出。print()输出默认换行,如果要实现不换行,需要在变量后边加上end=""