Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Requirements: - The assignment is based on topics covered from Week-1 to 4. - You need to carefully follow the input format and generate sensible
Requirements: - The assignment is based on topics covered from Week-1 to 4. - You need to carefully follow the input format and generate sensible output. If the program crashes during testing, you may lose the corresponding marks in specific tests. - This assignment should be submitted on 25/12/20224pm through Turnitin. Any submission after the due date will be dealt with late submission penalties. Task 1 (10 marks) Write a program to calculate the Distance travelled. For example, if a train travels 40 kilometres per hour for three hours, the distance travelled is 120 kilometres. Write a program that asks the user for the speed of a vehicle (in kilometres per hour) and the number of hours it has travelled. It should then use a loop to display the distance the vehicle has travelled for each hour of that time period. (The distance a vehicle travels can be calculated as follows: distance = speed * time) Sample output: What is the speed of the vehicle in (in kilometres per hour)? 40 How many hours has it travelled? 3 Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some examples of pseudocode can be found at http://www.unf.edu/ broggio/cop2221/2221pseu.htm . Select 3 sets of test data that will demonstrate the 'normal' operation of your program: that is test data that will demonstrate what happens when VALID input is entered. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program. Set it out in a tabular form: the test data, the reason it was selected, the output expected as a result of using that test data, and finally leave space to record the output actually observed when the test data is used. Sample test data table should be like the below
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started