$20 Bonus + 25% OFF
Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!
Students Who Viewed This Also Studied
HS1031 Introduction to Programming
Task
Purpose:
This assignment evaluates your understanding of basic programming principles using Python language. In particular, it assesses your ability to develop algorithms to solve simple problems, successfully develop and run Python programs, and your ability to write meaningful comments when necessary. The assignment also provides a platform for students to work together in groups to develop solutions for programming problems, similar to the way complex programming projects are done in real-world.
Q1. Define function weSort.py which determines whether a list is sorted. The function takes a list as an input and returns True if the list is sorted and False otherwise. A list is considered sorted ascendingly if it contains no items or if each item except the last, is greater than or equal to the preceding item.
Testing
Please test your function against the following lists:
(a) lyst = []
print(weSort(lyst))
(b) lyst = [1]
print(weSort(lyst))
(c) lyst = list(range(10))
print(weSort(lyst))
(d) lyst[9] = 3
print(weSort(lyst))
2. Develop a game using a function called mindRead() (save the file as mind.py). mindRead randomly generates a magic number between 80 and 100, and then asks the Player to guess the number. The Player tries to guess this Magic number in the least number of attempts. Each time the Player chooses a number, mindRead tells them whether the chosen number is less than, equal or greater than the Magic number.
The game ends when the Player types “Quit” or correctly guesses the magic number. mindRead prints “Goodbye” if the user quits the game, or the number of attempts if the user correctly guesses the magic number.
For example:
Assume that the magic number is 20. If the Player chooses 15 in the first attempt, the program prints out “the Magic number is greater than 15”. If the Player chooses 24 in the second attempt, the program prints out “the Magic number is less than 24”. If the user chooses 20 in the third attempt, the program prints out “Congrats! you have guessed the correct number in
3. Develop another game which does exactly the opposite of mindRead. Define a function and call it compuRead() (save the file as compu.py). compuRead allows the user to choose a magic number between 1 and 100, and then let the computer guess that number. After each guess, the user lets the computer know whether the guessed number is greater than, less than, or equal to the magic number. The user enters “1” when computer’s guess is larger than the magic number, “2” when it is less, and “3” when the guess is correct. The program eventually prints the number of attempts it took the computer to correctly guess the magic number.
For example:
Suppose that the user chose 30 as a magic number. Suppose that the first guess of the computer is 25. The user enters “2” as the computer’s guess is less than 30. Assume that the second guess of the computer is 35. The user enters “1” as the computer’s guess is greater than 30. And now let’s assume the computer gets it right in the third attempt and chooses 30, the program prints: “Hooray! I guessed your magic number correctly in
HS1031 Introduction to Programming
Answer in Detail
Solved by qualified expert
Get Access to This Answer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
17 More Pages to Come in This Document. Get access to the complete answer.
More HS1031 HS1031 Introduction to Programming : Questions & Answers
Computer Programming
You are required to design a program for Health Club Membership. The program requires user to input the members category (Adult, Child and Senior Citizen) and duration of the membership. The user can get 20% discount if duration of the membership is equal to 24 months or more, and monthly inst …
View Answer
ITECH2002 UML Diagram
In this assignment you will model the behaviour of systems or subsystems for two of your most complex use cases using two UML diagrams (activity diagram and system sequence diagram) and write the extended use case description. You must also submit test plans and screens developed using InVision. Air …
View Answer
Business Management
We are doing a MBA project where we are planning to develop an app. As we have not developed the app and we are just having an idea of the app. We have just done the 1st round of customer discovery, we have tested 3 hypotheses. So for this assignment we want 3 new hypotheses to test, but remember we …
View Answer
COMP2240 Operating Systems
Question:
Task 1:
Examine the iptalk.c program; identify the server code and answer the following [just add screenshots from the programs shared]:
What function calls are required for a server to accept a TCP connection from a client? What function calls are required for a client to ini …
View Answer
Content Removal Request
If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.
Choose Our Best Expert to Help You
Carson Bragg
PhD in Management with Specialization in Project Management
3158 – Completed Orders
Hire Me
Still in Two Minds? The Proof is in Numbers!
38983 Genuine Reviews With a Rating of 4.9/5.
Supply Chain
Programming: 3 Pages, Deadline:
9 days
Outstanding work. I will work with you again and again soon. I really appreciate your help; thank you so much.
User ID: 8***71 Riyadh, Saudi Arabia
Property Law
Course Work: 1 Page, Deadline:
20 days
all work is done very well, i think i will ask more help from you in future. Thanks
User ID: 8***63 Riyadh, Australia
Management
Assignment: 12 Pages, Deadline:
10 days
Credit to the expert who did a great job with this assignment! Covered most of the requirements! Thank you!
User ID: 3***95 Riyadh, Singapore
Business Law
Home Work: 4 Pages, Deadline:
9 days
Solution was provided in a timely manner. Expert managed to meet my expectation. Have yet to receive my result yet
User ID: 8***16 Riyadh, Singapore
Statistics
Programming: 4 Pages, Deadline:
4 days
This company has taken their work seriously and did a great job in producing a top quality assignment. highly recommended.
User ID: 7***37 Riyadh, Singapore
Assignment
Essay: 5 Pages, Deadline:
3 days
The writer did an awesome job with my assignment. This is my third time with them and they have kept to their quality of work.
User ID: 7***37 Riyadh, Singapore
Management
Assignment: 12 Pages, Deadline:
19 days
I am very happy to get my 100% Grade in my assessment. I wish say thank you so much.
User ID: 4***18 Riyadh, Australia
Project Management
Assignment: 4 Pages, Deadline:
9 days
Well written with sheer creativity. Always on time. Well done. I surely will recommend.
User ID: 1***16 Bella Vista, Australia
Healthcare
Essay: 2 Pages, Deadline:
15 days
Nice work! Thanks for the revision. It meets the requirement now. I am very satisfied with the work.
User ID: 7***67 Bella Vista, United States
Marketing
Home Work: 1 Page, Deadline:
23 days
Good job. Will use expert again. Thank you for your help and time that I needed on this assignment.
User ID: 5***56 San Francisco, United States
Accounting
Essay: 2 Pages, Deadline:
8 days
Received a 90/90 on my assignment, thank you to the professionals for completing this in a timely manner.
User ID: 8***75 San Francisco, United States
Assignment
Home Work: 1 Page, Deadline:
5 days
This service is an exquisite one. Answers came out early, accurate work was done and all
User ID: 8***17 Accra, Ghana
Assignment
Home Work: 1.2 Pages, Deadline:
7 hours
So far the papers were before time. The is not graded yet but overall i like the personal opinion. I did do little amend. I like the paper.
User ID: 7***0 Castro Valley, United States
Assignment
Home Work: 1.2 Pages, Deadline:
7 hours
So far there was 2 places where it was note quotes correctly with critiques, but i fixed it. overall the paper was very good
User ID: 7***0 Castro Valley, United States
Psychology
Essay: 2 Pages, Deadline:
1 day
Great job on working on this paper that allowed me to get a good mark. Would recommend this service
User ID: 6***81 Castro Valley, Canada
Nursing
Essay: 5 Pages, Deadline:
26 days
I am satisfied with the assignment. Prof. commented excellent job and i got good grades. Thank you.
User ID: 7***90 Castro Valley, Canada
Civil Law
Assignment: 10 Pages, Deadline:
15 days
My marks 15/20 thank you very much. and well done! My lecturer is veteran person he loves long essay 
User ID: 1***1 Bintulu, Malaysia
Business Law
Home Work: 12 Pages, Deadline:
7 days
OMG my marks 18/20 luckily im so worry at first but at the end it’s coming out nicely, thank you very much and well done! 
User ID: 1***1 Bintulu, Malaysia
Business Law
Assignment: 18 Pages, Deadline:
8 days
OMG just received marks today 28/30 thank you so much
the way writing follow as what i need, well done!
User ID: 1***1 Bintulu, Malaysia
Management
Essay: 15 Pages, Deadline:
10 days
All learning outcomes achieved.Fair discussion of PESTLE/SWOT/Porter forces. But can evaluate by prioritizing the factors in the order of its impact a …
User ID: 6***76 Bintulu, Hong Kong
Supply Chain
Programming: 3 Pages, Deadline:
9 days
Outstanding work. I will work with you again and again soon. I really appreciate your help; thank you so much.
User ID: 8***71 Riyadh, Saudi Arabia
Property Law
Course Work: 1 Page, Deadline:
20 days
all work is done very well, i think i will ask more help from you in future. Thanks
User ID: 8***63 Riyadh, Australia
Management
Assignment: 12 Pages, Deadline:
10 days
Credit to the expert who did a great job with this assignment! Covered most of the requirements! Thank you!
User ID: 3***95 Riyadh, Singapore
Business Law
Home Work: 4 Pages, Deadline:
9 days
Solution was provided in a timely manner. Expert managed to meet my expectation. Have yet to receive my result yet
User ID: 8***16 Riyadh, Singapore
Statistics
Programming: 4 Pages, Deadline:
4 days
This company has taken their work seriously and did a great job in producing a top quality assignment. highly recommended.
User ID: 7***37 Riyadh, Singapore
Assignment
Essay: 5 Pages, Deadline:
3 days
The writer did an awesome job with my assignment. This is my third time with them and they have kept to their quality of work.
User ID: 7***37 Riyadh, Singapore
Management
Assignment: 12 Pages, Deadline:
19 days
I am very happy to get my 100% Grade in my assessment. I wish say thank you so much.
User ID: 4***18 Riyadh, Australia
Project Management
Assignment: 4 Pages, Deadline:
9 days
Well written with sheer creativity. Always on time. Well done. I surely will recommend.
User ID: 1***16 Bella Vista, Australia
Healthcare
Essay: 2 Pages, Deadline:
15 days
Nice work! Thanks for the revision. It meets the requirement now. I am very satisfied with the work.
User ID: 7***67 Bella Vista, United States
Marketing
Home Work: 1 Page, Deadline:
23 days
Good job. Will use expert again. Thank you for your help and time that I needed on this assignment.
User ID: 5***56 San Francisco, United States
Accounting
Essay: 2 Pages, Deadline:
8 days
Received a 90/90 on my assignment, thank you to the professionals for completing this in a timely manner.
User ID: 8***75 San Francisco, United States
Assignment
Home Work: 1 Page, Deadline:
5 days
This service is an exquisite one. Answers came out early, accurate work was done and all
User ID: 8***17 Accra, Ghana
Assignment
Home Work: 1.2 Pages, Deadline:
7 hours
So far the papers were before time. The is not graded yet but overall i like the personal opinion. I did do little amend. I like the paper.
User ID: 7***0 Castro Valley, United States
Assignment
Home Work: 1.2 Pages, Deadline:
7 hours
So far there was 2 places where it was note quotes correctly with critiques, but i fixed it. overall the paper was very good
User ID: 7***0 Castro Valley, United States
Psychology
Essay: 2 Pages, Deadline:
1 day
Great job on working on this paper that allowed me to get a good mark. Would recommend this service
User ID: 6***81 Castro Valley, Canada
Nursing
Essay: 5 Pages, Deadline:
26 days
I am satisfied with the assignment. Prof. commented excellent job and i got good grades. Thank you.
User ID: 7***90 Castro Valley, Canada
Civil Law
Assignment: 10 Pages, Deadline:
15 days
My marks 15/20 thank you very much. and well done! My lecturer is veteran person he loves long essay 
User ID: 1***1 Bintulu, Malaysia
Business Law
Home Work: 12 Pages, Deadline:
7 days
OMG my marks 18/20 luckily im so worry at first but at the end it’s coming out nicely, thank you very much and well done! 
User ID: 1***1 Bintulu, Malaysia
Business Law
Assignment: 18 Pages, Deadline:
8 days
OMG just received marks today 28/30 thank you so much
the way writing follow as what i need, well done!
User ID: 1***1 Bintulu, Malaysia
Management
Essay: 15 Pages, Deadline:
10 days
All learning outcomes achieved.Fair discussion of PESTLE/SWOT/Porter forces. But can evaluate by prioritizing the factors in the order of its impact a …
User ID: 6***76 Bintulu, Hong Kong
Have any Query?
The post HS1031 Introduction to Programming- Opposite Of Mindread appeared first on My Blog.