Question: Python Part three: Programming52 points in total, 7 questions 1Write a program to randomly generate two integers between 0 and 100, and prompt the user

Python

Part three: Programming52 points in total, 7 questions 1Write a program to randomly generate two integers between 0 and 100, and prompt the user to enter the sum of the single digits of these two integers. If the answer is correct, the program reports the result as True, otherwise it reports False.7 points Example 1 Suppose two integers are 14 and 28. What is 4 + 810 4 + 8 = 10 is False

Example 2 Suppose two integers are 13 and 26. What is 3 + 69 3 + 6 = 9 is True

2Use nested loops to program two programs for pattern A and pattern B, respectively.7 points

Python Part three: Programming52 points in total, 7 questions 1Write a program

3A palindrome prime refers to a number that is both prime and palindrome. For example: 131 is both a prime number and a palindrome. Programing with functions to display the first 100 palindrome prime numbers. 10 numbers per line, and aligned accurately ().8 points Example

to randomly generate two integers between 0 and 100, and prompt the

4Design a class by using the UML class diagram

user to enter the sum of the single digits of these two

integers. If the answer is correct, the program reports the result as

True, otherwise it reports False.7 points Example 1 Suppose two integers are

14 and 28. What is 4 + 810 4 + 8 =

10 is False Example 2 Suppose two integers are 13 and 26.

Pattern A Pattern B 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 6 5 4 3 2 1 points) Example: 2 3 313 353 5 373 7 383 11 727 101 757 131 787 151 797 181 919 191 929 The get methods for these data fields are provided in the class, but are omitted in the UML diagram for brevity. BMI -name: str The name of the person -age: int The age of the person -weight: float The weight of the person in pounds. -height: float The height of the person in inches BMI (name: str, age: int, weight: Creates a BMI object with the specified float, height: float) name, age (the default is 20), weight. and height get BMIO: float Returns the BMI getStatus: str Returns the BMI status (eg, Normal, Overweight, etc.) 5. Prompt the user to enter two integers as the number of rows num_r and the number of columns num_c. Generate a two-dimensional list with num_r row and num_c column, the elements in the list are random non-negative integers and are not exceeding 9. Finally calculate and print the sum of all elements. 8 points

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!