Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: 1 A Special Number is a number when the sum of the factorial of digits is equal to the original number (given number). For

Question: 1 A Special Number is a number when the sum of the factorial of digits is equal to the original number (given number). For example, 145 is a Special Number because 145 = 1! + 4! + 5!. Your task is to write a Python code that takes some numbers as user input (separated by a comma) in a single line and groups the Special & Non-Special numbers in a dictionary. Note that the values corresponding to the keys in that dictionary must be in tuple format. Sample Input 1: 145, 346, 2, 83221, 7999888 Sample Output 1: {'Special': (145, 2), 'Non-Special': (346, 83221, 7999888 )} ----------------------------------------------------------------- Sample Input 2: 1431, 69716, 353, 7969828 Sample Output 2: {'Special': (), 'Non-Special': (1431, 69716, 353, 7969828)}

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions