伪代码赋值
我被分配了一项任务,而且我对伪代码很陌生。有人可以检查或修复我的代码吗?
(任务) 任务一——成为海景码头之友会员 建立一个制度,让人们成为海景码头之友的会员,并为每个新 成员输入:
- 他们的名字和姓氏,
- 无论他们是否愿意作为志愿者工作,
- 如果他们选择志愿服务,请从以下位置确定区域:
- 码头入口大门
- 礼品店
- 绘画和装饰
- 加入日期
- 无论是否支付了 75 美元的费用。
所有这些信息都需要使用合适的数据结构来存储。
INPUT← “name”
OUTPUT← “Work as a volunteer”
IF “no” THEN END
ELSE ask for location
INPUT← “Pier entrance gate”, “The gift shop”, “Painting and decorating”
THEN
OUTPUT← “Date of joining”
INPUT← “Date”
THEN ask for payment
IF paid “$75”
OUTPUT←”Thank you”
END
ELIF “not paid”
OUTPUT← “BYE”
在准备考试时,考生应通过写作尝试以下实际任务 以及测试一个或多个程序。 海景码头之友是一个致力于修复和维护海景码头的组织 镇。码头是一种木结构,提供海上走道。码头需要定期 码头的维护和朋友们需要为此筹集资金。
海景码头之友会员每年每人缴纳 75 美元,作为码头运营费用的捐款。 这使他们有权全年免费进入码头。他们还可以自愿帮助运营 码头,在码头入口处工作,在礼品店工作,或油漆和装饰。 为了提供额外收入,可以赞助码头的木板。一块黄铜牌匾, 包含赞助商选择的短信,安装在码头的木板上,捐赠 200 美元。
为海景码头之友编写并测试一个或多个程序:
- 您的一个或多个程序必须包含适当的数据输入提示。数据必须是 进入时验证。
- 所有输出,包括错误消息,都需要清晰易懂地列出。
- 所有变量、常量和其他标识符都必须具有有意义的名称。 您将需要完成这三项任务。每项任务都必须经过充分测试。
I have been given an assignment and I am new to pseudocode. Can someone check or fix my code please.
(TASK)
Task 1 – becoming a member of Friends of Seaview Pier
Set up a system to enable people to become members of Friends of Seaview Pier and for each new
member enter:
- their first name and last name
- whether or not they wish to work as a volunteer
- if they choose to volunteer, identify the area from:
- the pier entrance gate
- the gift shop
- painting and decorating
- the date of joining
- whether or not they have paid the $75 fee.
All of this information needs to be stored using suitable data structures.
INPUT← “name”
OUTPUT← “Work as a volunteer”
IF “no” THEN END
ELSE ask for location
INPUT← “Pier entrance gate”, “The gift shop”, “Painting and decorating”
THEN
OUTPUT← “Date of joining”
INPUT← “Date”
THEN ask for payment
IF paid “$75”
OUTPUT←”Thank you”
END
ELIF “not paid”
OUTPUT← “BYE”
In preparation for the examination candidates should attempt the following practical tasks by writing
and testing a program or programs.
Friends of Seaview Pier is an organisation devoted to the restoration and upkeep of a pier in the
town. A pier is a wooden structure that provides a walkway over the sea. The pier requires regular
maintenance and the friends of the pier need to raise money for this purpose.
Members of Friends of Seaview Pier each pay $75 per year, as a contribution to the pier’s running costs.
This entitles them to free admission to the pier throughout the year. They can also volunteer to help run the
pier, by working at the pier entrance gate, working in the gift shop, or painting and decorating.
To provide additional income, the pier’s wooden planks can be sponsored. A brass plaque, which
contains a short message of the sponsor’s choice, is fitted to a plank on the pier, for a donation of $200.
Write and test a program or programs for the Friends of Seaview Pier:
- Your program or programs must include appropriate prompts for the entry of data. Data must be
validated on entry. - All outputs, including error messages, need to be set out clearly and understandably.
- All variables, constants and other identifiers must have meaningful names.
You will need to complete these three tasks. Each task must be fully tested.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论