Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USING PYTHON ou are given a positive integer (whole number) stored in a variable called X. Use a chained conditional to implement these rules in
USING PYTHON ou are given a positive integer (whole number) stored in a variable called X. Use a chained conditional to implement these rules in Python (hint: for evenly divisible, try using the modulus operator described in section 5.1 of ThinkPython 2E): If this number is evenly divisible by 3 but not 5, print "only 3" If this number is evenly divisible by 5, but not 3, print "only 5" If this number is evenly divisible by both 3 and 5, print "3 and 5" Otherwise (not evenly divisible by either), print "none"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started