logo

CSP1150D Programming Principles

Design and implement a “Golf Club” program that records information about golfers and tournaments.

4 Pages502 Words447 Views
   

Added on  2022-11-03

About This Document

This program stores the name and scores of golf players in a data structure using Python. It uses a menu-driven program with four options: enter player details, display player details, search player, and exit. The data is stored using lists, and the program includes functions to ask for player details and scores. The algorithm for the program is also provided.

CSP1150D Programming Principles

Design and implement a “Golf Club” program that records information about golfers and tournaments.

   Added on 2022-11-03

ShareRelated Documents
Running head: CSP1150D PROGRAMMING PRINCIPLES
CSP1150D Programming Principles
Name of the Student
Name of the University
Authors note
CSP1150D Programming Principles_1
CSP1150D PROGRAMMING PRINCIPLES
2
For this program, the main criteria was to develop a program that will store name, and
their scores of the golf players in some data structure in python language. The program is
started by declaring a list all_players[] as a global that contains zero elements. Then the
project is prints a welcome statement to the user. After this the user will be asked to select the
operation they want to proceed with. There are four options which are enter player details,
display the player details, search player and finally exit from the program. The menu driven
program is presented to the user using a while loop that keeps asking for user options until
users chooses the exit options. The data is stored using lists, list acts as container available in
python inbuilt data structure that is helpful in storing different types of data at the same time.
Compared to the Set data structure, list data structure in Python is considered as ordered and
have a definite size.
There are functions declared in the program that asks details of the players and their
scores. At first the number of players whose details will be saved through the program is
asked and user will enter the number of the players as integer. The score of player is taken as
input (in the form of integer) when the user enters the values of the name and score to the list.
Following is the algorithm for the implemented project;
Step1: Prompt option for the user
Step 2: if Option =1
Step 3: Enter the number of players
Step 4: Enter the name and score of the players.
Step 5: Go to menu prompt
Step 6: if option =2
Step 7: Search for a Player
CSP1150D Programming Principles_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
ITECH1400 FUNDAMENTALS OF PROGRAMMING IN PYTHON
|4
|158
|30

Programing Concepts Assignment PDF
|13
|1389
|147

ITECH1000 Programming 1 Assessment 2
|26
|2595
|67

Dynamic Memory Allocation
|19
|2420
|18

ITECH1400 Fundamentals of Programming - Australian Tax Office
|12
|1191
|15

COMP B10 Introduction to Programming Methodologies using Python
|12
|3218
|591