I have a question about the direction of the Python cord.

Asked 1 years ago, Updated 1 years ago, 86 views

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

2022-09-22 16:47

2 Answers

a = input ("User input 1 :") b = input ("User Input2 :") c = input ("User Input3 :")

print(a+b+c)


2022-09-22 16:47

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...?


2022-09-22 16:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.