Python基础入门例程5-NP5 格式化输出(一)

目录

描述

输入描述:

输出描述:

示例1

解答:

说明:


描述

牛牛、牛妹和牛可乐正在Nowcoder学习Python语言,现在给定他们三个当中的某一个名字name,

假设输入的name为Niuniu,则输出 I am Niuniu and I am studying Python in Nowcoder!

请按以上句式输出相应的英文句子。

输入描述:

一行一个字符串表示名字。

输出描述:

假设输入的name为Niuniu,则输出I am Niuniu and I am studying Python in Nowcoder!

请按以上句式输出相应的英文句子。

示例1

输入:

复制代码
Niuniu

输出:

复制代码
I am Niuniu and I am studying Python in Nowcoder!

解答:

python 复制代码
name = input()
print('I am %s and I am studying Python in Nowcoder!'%name)
#print('I am {} and I am studying Python in Nowcoder!'.format(name))
#print('I am {} and I am studying Python in Nowcoder!'.format(name))

说明:

考查print函数的格式化输出知识点

相关推荐
RSABLOCKCHAIN6 小时前
AI Agents in LangGraph-2
人工智能·python
WA内核拾荒者7 小时前
WhatsApp 账号异常检测的自动化告警系统设计
数据库·python·自动化
码流怪侠7 小时前
【GitHub】Bend:让 GPU 并行编程像写 Python 一样简单
python·github
魔力女仆8 小时前
分享一个 JS 鼠标跟随贪吃蛇背景库
开发语言·javascript·计算机外设
2401_894915538 小时前
GEO 搜索优化完整源码从零部署:环境配置、集群搭建全流程
开发语言·python·tcp/ip·算法·unity
麻瓜老宋9 小时前
AI开发C语言应用按步走,表达式计算器calc的第二十二步,分号赋值链式修复、TOKEN_ASSIGN
c语言·开发语言·atomcode
zhiSiBuYu051710 小时前
Python3 模块开发与应用实战指南
python
颜x小11 小时前
[C#] C++与c#语法对比
开发语言·c++·c#
databook11 小时前
用方差阈值过滤掉“惰性特征”
python·机器学习·scikit-learn