If you enter an integer, you want to write a code that you want to represent as a sum of three decimal places. Example) 10=2+3+5
Currently, I wrote the most basic decimal discrimination function and the number of users entering it, but I don't know how to write it after that.
primes python
a = input ("User input 1 :") b = input ("User Input2 :") c = input ("User Input3 :")
print(a+b+c)
Thank you. Then
''''def is_prime(num): for i in range(2,num): if n % i==0: #Not a decimal! return False return True''' Do I receive an integer after the decimal determination function and write it as a hint to express the integer as the sum of the prime numbers?
By the way, the user input only needs to be an integer from 1 to 1000, but does the sum of a few also need to be input...?
© 2024 OneMinuteCode. All rights reserved.