简体   繁体   English

python作业伪编码,流程图

[英]python homework Pseudocoding, flowchart

This is my assignment I have to do and I need help with it.这是我必须完成的任务,我需要帮助。 I'm in an online class and completely new to all of this.我在一个在线 class 中,对这一切都是全新的。

If someone could give me some useful tips on how to do a flowchart and pseudocode that would be great thank you for your help.如果有人能给我一些关于如何制作流程图和伪代码的有用提示,那将非常感谢您的帮助。 They wouldn't show the picture they turned it into a link.他们不会显示他们把它变成链接的图片。 also this is what I have so far for my hw assignment as for the code idk if it's right or wrong.这也是我迄今为止为我的硬件分配所拥有的代码 idk 是否正确或错误。 Any and all help would be great thank you so much.任何和所有的帮助都会非常感谢你。

name = 'Welcome to Fiber Optic's Cable Company' print (name) fibercost =.87 print (fibercost) compname = "Fiber Optic Cable" print (compname) feet = 5 print (feet) print (feet * fibercost) total_cost = 4.35 print (total_cost) print (total_cost * feet *.87) cal_info = 18.9225 print (cal_info, compname) name = 'Welcome to Fiber Optic's Cable Company' print (name) fibercost =.87 print (fibercost) compname = "Fiber Optic Cable" print (compname) feet = 5 print (feet) print (feet * fibercost) total_cost = 4.35 print (total_cost) 打印 (total_cost * 英尺 *.87) cal_info = 18.9225 打印 (cal_info, compname)

pseudocode should look something like this.伪代码应该看起来像这样。 #input display "Welcome to my program" input "What is company name" into compName input "How many feet of fiber optic would you like installed" into totalFeet #processing section total equals totalFeet *.87 #multiply totalFeet times.87 #output display "The total cost is: " + total "and company name is" + compName #input 显示“欢迎使用我的程序”输入“公司名称是什么”到 compName 输入“你想安装多少英尺的光纤”到 totalFeet #processing 部分总计等于 totalFeet *.87 #multiply totalFeet times.87 #output display "总成本是:" + total "和公司名称是" + compName

 name = "Welcome to Fiber Optic's Cable Company" print(name) fibercost =.87 print(fibercost) compname = "Fiber Optic Cable" print(compname) feet = 5 print(feet) print(feet * fibercost) total_cost = 4.35 print(total_cost) print (total_cost * feet *.87) cal_info = 18.9225 print (cal_info, compname)
This works for me but i am new to python, fyi i made these edits for python 3.10 这对我有用,但我是 python 的新手,仅供参考,我为 python 3.10 进行了这些编辑

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM