PROGRAMMING

MINTE9
REMEMBERS




Conditional

p85 With conditional statement we can check condtions and change the behavior.
 RunCode
number = 200

if number % 10 == 0:
    print ("Number is divisible by 10")
elif number % 10 > 0:
    print ("Number is not divisible by 10")
else:
    print ("Something else")
... 1 lines
˄˄˄
p93 Python provides a function named input that stops the program and waits for the user input.
 
>>> name = input('What is your name?\n')
What is your name?
John
>>> name
'John'
Task

 CompleteTask
"""
There are no positive integers a, b, c so that 
a**n + b**n = c**n for any number > 2 (Fermat's Last Theorem)

--------------------------------------------------------------

Define a function prompt_user() that ask user 
to input values for a, b, c and n and converts them to ingeters
    
Define a function check_fermat() that checks
whether the numbers violate Fermat's theorem. """


# SOLUTION

???

solution code
Questions    
6. Operators
05 . Conditional
Last update:   25-07-2021

        A B C D E F
🔔
1/1