我如何解决这个长问题PLZ的帮助 [英] How do I solve this long question plz help

查看:101
本文介绍了我如何解决这个长问题PLZ的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题1:一家初创游戏公司叫你帮助原型游戏,他们想先评估你的基本技能,所以你被要求设计一个简单的虚拟游戏代码,在(0-100)之间生成一个随机数并将数字传递给两个函数,一个用于确定数字是否为素数,另一个用于检查数字是否大于50,并打印出2分(如果数字是素数则为1分,如果是数量大于50)



问题2:在评估你的技能后,公司发现你很有才华,所以他们聘请你设计一款真正的游戏,游戏与第一个虚拟游戏的概念相同,但具有一些功能:-999),一个用于玩家,一个用于计算机。

的功能是:如果玩家编号有重复数字,则玩家编号为1点时为0点(例如:121:重复数字为数字[1])。 o对于编号较大的玩家,1分。

玩家)并说明谁是赢家或者是平局。



问题3:您之前设计的游戏在市场上取得了巨大的成功,因此该公司决定为新游戏开发原型,当然他们称之为您!新游戏实际上是一个猜谜游戏,使得:程序应该在开始时生成(100和999)之间的随机数并保存。用户只有一次尝试输入一个3位数字,如果输入的数字的任何数字与随机生成的数字的任何数字相匹配,他就赢了,否则他输了。如果他赢了,程序应显示两个数字和匹配的数字,否则打印丢失。该程序应该让用户有机会再次使用新生成的号码进行播放。



问题4:新游戏的反馈令公司感到惊讶,因此他们决定将新游戏发布到商店,但几乎没有变化,猜猜是什么......他们打电话给你!游戏仍然是一个猜谜游戏,玩家需要弄清楚该程序产生的随机数,但他们希望它更难获胜,以便该程序应该在(100和999)之间产生一个随机数。开始并保存它。用户无限次试用,直到他正确猜出数字。该程序应该调用一个提示功能,生成并打印一个提示给玩家,提示是三位数的乘积(例如,如果生成的数字是123,提示是6,因为1 * 2 * 3 = 6)一个函数应该比较这两个数字,如果它们匹配打印输出就赢了,如果没有则要求用户输入一个新的猜测数和试用数。



问题5:不幸的是,你开发的最后一款游戏并没有对市场产生影响,而且大多数评论认为游戏仍然很容易获胜,所以公司决定下载游戏更新,我想你已经知道他们叫谁了......你!游戏的更新主要有4个变化:生成的数字在(1000,9999)之间。提示是数字的总和。 (例如:如果生成的数字是1234,提示是10,因为1 + 2 + 3 + 4 = 10)用户只有十次试验来确定确切的数字,否则他输了一个新提示用每个跟踪使用另一个提示生成函数,提示是最后一次猜测的正确位数(例如:如果生成的数字是1234而用户输入1324则打印2位数字是正确的并给他下一次试验)



我尝试了什么:



我试过但失败次数太多

解决方案

我会给你最好的帮助:



如果你认为你想成为一名软件开发人员,你会深入研究这个问题,并有一个很好的时间解决问题 - 和学习



否则,如果它太多了作为家庭作业,当你在现实世界中工作时,情况会更加如此。找到别的东西来谋生。你喜欢的东西,或者至少是你能够的东西。



编程不适合所有人 - 很多专业程序员从来没有学过它 - 他们为了它的纯粹乐趣而被它吸引。



如果这听起来很刺耳,那就不像一辈子花在无能和畏惧中那样苛刻发现了。


家庭作业的目的是让你练习并熟悉将来作为专业程序员的要求。如果我们为你做功课,就会失去作业的主要目的。

这项作业甚至不复杂,只是比平时更大。如果仔细观察,它已经分为5个小问题。尝试按顺序一次回答一个问题。



Nota:真正的要求更复杂,因为它们几乎从不一致,所以你必须锻炼什么是什么,客户经常以杂乱无章的方式描述他想要的东西。你必须将各个部分放在一起,使它们合乎逻辑且一致。



如果你可以锻炼任何东西,你需要和老师谈谈。

如果您遇到特定问题,请说明它是什么,显示您的代码,我们将很乐意为您提供帮助。


Question1: A Start-up gaming company called you to help with a prototype game, they want to evaluate your basic skills first so you were asked to design a simple dummy game code that generates a random number between (0-100) and pass the number to two functions, one to determine if the number is prime and the other to check if the number is larger than 50, and print out the score out of 2 (1 point if the number is prime, 1 point if the number is larger than 50)

Question 2: after evaluating your skills the company found that you are very talented, so they hired you to design a real game, the game is the same concept of the first dummy game but with some features: -999), one for the player and one for the computer.
function such that : o 1 point if the player number is prime o 1 point if the player number has a repeated digit ( Example: 121 : have a repeated digit which is digit [1] ) . o 1 point for the player who has the bigger number.
player ) and state out who is the winner or it is a tie.

Question 3: The game that you designed previously accomplished a huge hit in the market, so the company decided to develop a prototype for a new game and of course they called YOU! the new game is actually a guessing game such that: The program should generate a random number between (100 and 999) at the beginning and save it. The user has only one try to enter a 3-digit number and if any digit of the entered number matches with any digit of the random generated number he wins otherwise he loses. The program should display the two numbers and the matched digit if he wins, otherwise print you lost. The program should give the opportunity to the user to play again with a new generated number if he wants.

Question 4: The feedback of the new game was surprising to the company, so they decided to publish the new game to the store but with few changes and guess what…they called YOU! the game is still a guessing game where the player needs to figure out the random number generated by the program but they want it to be a little more difficult to win such that The program should generate a random number between (100 and 999) at the beginning and save it. The user has unlimited trials until he guesses the number correctly. The program should call a hint function that generates and prints a hint to the player, the hint is the product of the three digits (example if the generated number is 123 the hint is 6 since 1*2*3=6) A function should compare the two numbers, and if they match print out you win, if not then asks the user to enter a new guess number along with the trial number.

Question 5: Unfortunately, the last game you developed didn’t have an impact in the market, and most of the reviews states that the game is still easy to win, so the company decided to download an update for the game and I think you already knew who they called…YOU! The update of the game is mainly 4 changes: The generated number is between (1000,9999) The hint is the sum of the number. (Example: if the generated number is 1234 the hint is 10 since 1+2+3+4=10) The user has only ten trials to figure out the exact number otherwise he loses A new hint is generated with each trail using another hint function, the hint is the number of correct digits of the last guess (Example: if the generated number is 1234 and the user entered 1324 then print 2 digits are correct and give him the next trial)

What I have tried:

I have tried but failed too many times

解决方案

I'll give you the best help you'll ever get:

If you think you want to be a software developer, you'll dig into this and have a great time solving the problems - and learning.

Otherwise, if it's too much to do as homework, it'll be even more so when you're out working in the real world. Find something else to do for a living. Something that you like, or at least, that you're capable of.

Programming isn't for everyone - and many professional programmers never took a course to learn it - they were drawn to it for the sheer pleasure of it.

If this sounds harsh, it's not as harsh as a lifetime spent wallowing in incompetence and the fear of being found out.


The purpose of homework is having you practicing and getting familiar with the kind of requests you will get in future as a professional programmer. If we do your homework for you, it defeat the main purpose of homework.
This homework is not even complicated, it is just larger than usual. If you look carefully, it is already split into 5 smaller questions. try to answer questions one at a time in order.

Nota: Real like requirement are much more complicated because they are almost never consistent, so you have to workout what is what, and the customer often describe what he want in a disorganized way. You have to put pieces together and make them logical and consistent.

If you can workout anything, you need to have a talk with your teacher.
If you have a specific problem, explain what it is, show your code and we will be happy to help.


这篇关于我如何解决这个长问题PLZ的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆