(Palindromic prime) A palindromic prime is a prime number and also palindromic. For example, 131 is a prime and also a palindromic prime, as are 313 and 757. Write a
2 3 5 7 11 101 131 151 181 191
313 353 373 383 727 757 787 797 919 929
Trending nowThis is a popular solution!
Chapter 6 Solutions
Introduction to Java Programming and Data Structures Comprehensive Version (11th Edition)
Additional Engineering Textbook Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Starting Out With Visual Basic (8th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Python (4th Edition)
- In CORAL LANGUAGE please and thank you! Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Hint: Find the smallest value, and then subtract it from all three values, thus removing the gray.arrow_forwardSlove by pythonarrow_forwardQ1: Write a program that reads 10 numbers and then finds the largest number and prints it and finds the smallest number and prints it.arrow_forward
- using python, show #commentsarrow_forward(Numerical) Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point numbers with random numbers that have been scaled to the range 1 to 100. Then determine and display the number of random numbers having values between 1 and 50 and the number having values greater than 50. What do you expect the output counts to be?arrow_forwardUSE C++ LANGUAGEarrow_forward
- quadratic.py by using "sys.argv" ● Create a program, quadratic.py, that takes in three arguments that represent the a, b, and c values in the quadratic formula. The values should be to two decimal places. You do not need to account for imaginary values. Then print out both roots in the form: “The solutions are x and y” Where x and y correspond to the positive and negative roots, respectively.arrow_forwardIn python An emirp is a nonpalindromic prime number whose reversal is also a prime. For example, 17 is a prime, and 71 is a prime, so 17 and 71 are emirps. Write a function that displays the first n emirps, display 10 numbers per line. displayEmirps(n), where n – is the number of palindromic prime numbers to display Prompt the user to enter how many numbers to display.arrow_forward/*code Kth Largest Factor A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N. Input Format: The input is a comma-separated list of positive integer pairs (N, k). Output Format: The kth highest factor of N. If N does not have k factors, the output should be 1. Constraints: 1<N<10000000000 1<k<600. You can assume that N will have no prime factors which are larger than 13..arrow_forward
- Q8: Write in Python program: Among all three (3) digit numbers; There are some special numbers where the product of the numbers that make up it and the product of the sum are equal to itself. Number 135 is one of these special numbers. Find out all 3-digit numbers with this feature and how many they are in total and write the program that displays them on the screen. 135 = (1 x 3 x 5) x (1 + 3 + 5) Example Run: Numbers searched: XXX, ..., There are X three-digit numbers with this feature.arrow_forwardc# onlyarrow_forward1) Simple Calculator: In Python, implement a simple calculator that does the following operations: summation, subtraction, multiplication, division, sqrt, power, natural log and abs. a) Follow the instructions below: To work with the calculator, the user is asked to enter the first number, then the operation, and finally, a second number if required. Your code has to recognize the need for the second number and ask for it if required. After performing one operation, the calculator prints the output of the operation. After performing one operation, the calculator must not exit. It has to start again for the next operation. The calculator will be closed if the user writes 'e' as any input. Use functions to perform the operations and the appropriate conditions to prevent common errors such as entering characters as one of the numbers etc. b) Run your code and provide the results for at least one example per operation. - -arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning