subject

Sequence of numbers write a program that reads a sequence of integer numbers from the input and determine if there are two numbers in the sequence such that their sum is equal to 1000. if the sequence contains the numbers, the program must print 'yes', if it doesn't, it must print 'no'. sample input sample output & 123 456 789 1 10 20 500 999 yes note: your code should be able to convert the sample input into the sample output. however, this is not enough to pass the challenge, because the code will be run on multiple test cases. therefore, your code must solve this problem statement. time limit: 5.0 sec(s) for each input file memory limit: 256 mb source limit: 1024 kb marking scheme: marks are awarded if any testcase passes allowed languages: python 3 new submission all submissions python 3 (python 3.5.2) savedena 1 2 # sample code to perform i/o: 4 5 name = input() print('hi, %s.' % name) # reading input from stdin # writing output to stdout # warning: printing unwanted or ill-formatted data to output will cause the test cases to fail 10 # write your code here

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount they’ve accumulated into the pot. the rules for each player’s die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: ● before each opponent begins β—‹ output the score for the person and the computer. β—‹ output the opponents whose turn is beginning and ask the user to hit enter to continue. ● with each dice roll. β—‹ output the die value, and amount of the round pot. β—‹ if it’s the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. β—‹ the ai will continue playing until the round pot is 20 or more. ● once a player’s score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. ● once there is a winner β—‹ score totals are output along with who the winner was. user or computer β—‹ player is asked if they want to play again y or n. valid input should be y, y, or n, n. ● when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : ● you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 – 9 we can get the value modulus 10. ● call srand() with a value to seed it. it’s common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
You know the right answer?
Sequence of numbers write a program that reads a sequence of integer numbers from the input and dete...
Questions
question
Computers and Technology, 14.12.2021 15:50
question
English, 14.12.2021 16:00
question
Social Studies, 14.12.2021 16:00
question
Mathematics, 14.12.2021 16:00
question
Mathematics, 14.12.2021 16:00
question
Health, 14.12.2021 16:00
question
Mathematics, 14.12.2021 16:00
question
Mathematics, 14.12.2021 16:00
question
Physics, 14.12.2021 16:00
question
English, 14.12.2021 16:00
Questions on the website: 13722359