python 年龄计算流程图

发布于 2025-01-11 03:52:15 字数 257 浏览 5 评论 0原文

我已经完成了这个作业,其中我需要将一个简单的流程图转换为Python,但我被困在这一点上。我需要计算未来的年龄,但我不知道如何提供任何帮助,这会很好,提前致谢。流程图图像

这是我已经尝试过的:流程图

I've got given this homework and in it I need to convert a simple flowchart into python, but I am stuck on this one bit. I need to calculate the future age but I don't know how to any help with this would be nice, thanks in advance.FLOWCHART IMAGE

This is what I've already tried: Flowchart

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暮年慕年 2025-01-18 03:52:15

我希望这能解决您的问题!
参考这个:

name = input()
print("Hello ",name," I am from the year 2210 and I am 20 years old")
print("How old are you?")
age = int(input())
future_age = age+(2210-2020)
print("Wow, by 2210 you will be",future_age,"that is really old!")

I hope this solves your question!
Refer to this:

name = input()
print("Hello ",name," I am from the year 2210 and I am 20 years old")
print("How old are you?")
age = int(input())
future_age = age+(2210-2020)
print("Wow, by 2210 you will be",future_age,"that is really old!")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文