Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question covers materials up to Seminar 4. The data structure to use is List. Do not use nested list, set or dictionary for this

image text in transcribed

This question covers materials up to Seminar 4. The data structure to use is List. Do not use nested list, set or dictionary for this question. Keep the program modular by defining other functions if necessary. Read the entire question before attempting. You need to submit each part individually. a) TOTO is a legalised form of lottery sold in Singapore. To play TOTO, the buyer selects 6 numbers from 1 to 49 by marking them on a bet slip. Write the following functions: ticket V alidator(numbers: list): boolean - This function returns True if SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) Page 4 of 14 ICT133 Tutor-Marked Assignment the given numbers (in a list) are all unique all numbers are within 1 to 49 - Otherwise, return False. - For example, ticket V alidator ([5,47,6,32,49]) returns True ticket Validator ([5,6,7,6,45,31]) returns False ticket Validator ([51,6,7]) returns False (7 marks) b) Another way to place a bet is through "QuickPick", where the computer randomly selects 6 unique numbers for the buyer. Write the following function: quickPick( ): list use of the ticket V alidator() function in part (a), where possible. (7 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

How is slaked lime powder prepared ?

Answered: 1 week ago

Question

Why does electric current flow through acid?

Answered: 1 week ago

Question

What is Taxonomy ?

Answered: 1 week ago

Question

1. In taxonomy which are the factors to be studied ?

Answered: 1 week ago

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago