Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

& E Chrome File Edit View History Bookmarks People Window Help ? 95% [4] Tue 11:

ID: 3710866 • Letter: #

Question

& E Chrome File Edit View History Bookmarks People Window Help ? 95% [4] Tue 11:44 PM Q ??. ???? Portal X Practical-Exam-2-1 (anon-jzib x D H00325599_Abdalla Ali Ahmet C Computer Science question (X C Secure https://practicalexam21-anon-jzibqw.notebooks.azure.com/nb/notebooks/H00325599_Abdalla%20A1i%20Ahmed.ipynb * s jupyter H00325599_Abdalla Ali Ahmed (autosaved) e Azure Notebooks My Libraries Test2-Version-k12165-9-734sd (1) File Edit View Insert Cell Kernel Data Widgets Help Not Trusted Python 3.6 O 2 + x + Run c > Markdown " til Enter/Exit RISE Slideshow AUDIUC LAC LUI LIVIU A ALGIC ADYUMLOUVYLIUI OLUL GAGILDU VOLCULOG LIIGULA VUOL Your function must return the calculated total cost value [Total Cost = totalPersons x pricePerTicket) (4 Marks - Defining the Function: 2 marks | Accepting an input: 1 marks | Returning an output: 1 mark) In [ ]: ### Task-2 write a python code that reads price of one ticket and number of persons then calculate total cost using the above-defined function. After that, you need to display the total cost in the bellow format. Sample output (6 Marks - Calling the Function: 2 marks mark) | Display the Output: 2 marks | No Errors: 2 In [ : Fourth Question Task-1 Import the pandas module. (1 Mark) In [l]; import pandas as pd 900011 110 6O WA O w 9x190

Explanation / Answer

# Python program to read the price of one ticket and number of passengers and calculate total cost
# price per ticket
price=int(input("Enter the price per ticket"))


# number of persons

num = int(input("Enter a number of persons: "))

#total cost of ticket

TCT=price*num
  
print("The total cost of ticket is",TCT)