Python 1.)Write the definition of a function typing_speed, that receives two par
ID: 3907812 • Letter: P
Question
Python 1.)Write the definition of a function typing_speed, that receives two parameters. The first is the number of words that a person has typed (an int greater than or equal to zero) in a particular time interval. The second is the length of the time interval in seconds (an int greater than zero). The function returns the typing speed of that person in words per minute (a float). 2.)Given three String variables that have been given values, firstName, middleName, and lastName, write an expression whose value is the initials of the three names: the first letter of each, joined together. So if firstName, middleName, and lastName, had the values "John", "Fitzgerald", and "Kennedy", the expression's value would be JFK". Alternatively, if firstName, middleName, and lastName, had the values "Franklin", "Delano", and "Roosevelt", the expression's value would be "FDR".
Explanation / Answer
1) def typing_speed(words, time): return words / time 2) firstName[0] + middleName[0] + lastName[0]
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.