05 May Monday 20:00 Python Practice 21.05.03.
Question:Base on the explanation about the deque data structure, please finish the following code: class Deque: def __init__(self): pass def isEmpty(self): pass def...
Question:Base on the explanation about the deque data structure, please finish the following code: class Deque: def __init__(self): pass def isEmpty(self): pass def...
Question: The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula: BMI = weight / (height * height) Write a program...
Question 1: Use recursion to write a function has_digit that consumes a string and produces True if the string contains a digit (0 through 9) and False otherwise. Hints: Make sure that you have a base case. Make sure to use the function on a shorter string. Before calling the function,...
Microsoft Teams meeting Join on your computer or mobile app Click here to join the meeting Learn More Question 1. Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this: Sample Input: Which multiplication...
Question 1: Create a Circle class and intialize it with radius. Make two methods printArea and printCircumference inside the class which prints the area and circumference of the circle Sample Execution Input Enter radius(in meters) : 10 Output Circumference: 62.8m Area : 314 sq.m ...
Question 1: Given two strings, check if two strings are anagrams of each other An anagram is a word, phrase, or name formed by rearranging the letters of another, such as cinema, formed from iceman. Print True, if two strings are anagrams of each other otherwise print False. Sample...