Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A finger-print machine is kept in a school. All the students are required to record their finger-print on their arrival. Expected arrival time is common

image text in transcribed
A finger-print machine is kept in a school. All the students are required to record their finger-print on their arrival. Expected arrival time is common to all the students. For every one minute of late arrival, 50 paise is charged as fine. For example, if the arrival time of student is 9:03:10 and expected time is 9:00:00 then fine is Rs. 2. Given the details of students, their arrival time on a particular day and the expected arrival time, write an algorithm and the User Defined Function using dictionary in Python to take roll number, name and arrival time as input and use dictionary to print the rollno and the name of the students who came earlier than the expected arrival time and calculate fine amour Input Format Accept expected arrival time as a string from the user Accept total number of students (n) in the class Accept rollno, name and arrival time of 13 student in a dictionary from the user Accept rollno, name and arrival time of 2nd student in a dictionary from the user Accept rollno name and arrival time of nith student in a dictionary from the user Output Format Display the rolino and the name of the students in a dictionary who arrived earlier than the expected arrival time Total fine amount collected from the class for the day. Answer: (penalty regime: 0 %)

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

Students also viewed these Databases questions