& Chrome File Edit View History Bookmarks People Window Help ? 95% [4] Tue 11:42
ID: 3710865 • Letter: #
Question
& Chrome File Edit View History Bookmarks People Window Help ? 95% [4] Tue 11:42 PM Q E ??. ???? Portal X Practical-Exam-2-1 (anon-jzib x D H00325599_Abdalla Ali Ahmet C Computer Science question (X O Secure https://practicalexam21-anon-jzibqw.notebooks.azure.com/nb/notebooks/H00325599_Abdalla%20A1i%20Ahmed.ipynb AI s jupyter H00325599_Abdalla Ali Ahmed (autosaved) Azure Notebooks My Libraries Test2-Version-k12165-9-734sd (1) File Edit Help Not Trusted Python 3.6 O View D Insert + Cell Run Kernel c Data Widgets >> Markdown + 3 : il Enter/Exit RISE Slideshow (10 Marks - reading: 2 marks | condition: 2 marks | else and elif: 2 marks | output: 2 marks No errors: 2 marks) In ( : # Second Question write a python program that reads two numbers start and stop, using a for loop, this program displays all the numbers from start to stop and the sum of these numbers Sample output No errors: 2 (10 Marks - reading: 2 mark | FOR Loop: 4 marks | output: 2 marks marks) In [ ]: # Third Question ### Task-1 Define a function named calcTicketPrice that takes two parameters totalPersons and pricePerTicket as input Inside the function: write the required python statements to calculate the total cost Your function must return the calculated total cost value [Total Cost = totalPersons x pricePerTicket] (4 Marks - Defining the Function: 2 marksAccepting an input: 1 marks | Returning an output: 1 mark) JOOL 71 10 BO WA w 9x] 9Explanation / Answer
l=[]
start = int(input())
stop = int(input())
for i in range(start,stop):
l.append(i)
print(i)
print(sum(l))
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.