Click here to Skip to main content
15,917,709 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: python - tail stuck under the rocks? Pin
Member 787811615-Jul-19 5:28
Member 787811615-Jul-19 5:28 
AnswerRe: python - tail stuck under the rocks? Pin
Asday15-Jul-19 6:09
Asday15-Jul-19 6:09 
GeneralRe: python - tail stuck under the rocks? Pin
kalberts15-Jul-19 10:29
kalberts15-Jul-19 10:29 
GeneralRe: python - tail stuck under the rocks? Pin
Asday15-Jul-19 11:13
Asday15-Jul-19 11:13 
GeneralRe: python - tail stuck under the rocks? Pin
kalberts16-Jul-19 0:28
kalberts16-Jul-19 0:28 
AnswerRe: python - tail stuck under the rocks? Pin
Ri_Ho15-Jul-19 7:39
Ri_Ho15-Jul-19 7:39 
AnswerRe: python - tail stuck under the rocks? Pin
rk215315-Jul-19 8:20
rk215315-Jul-19 8:20 
AnswerRe: python - tail stuck under the rocks? Pin
Member 1224786015-Jul-19 10:07
Member 1224786015-Jul-19 10:07 
More python indention confusion ???

# Python program to check if the input number is prime or not

num = 15

# take input from the user
# num = int(input("Enter a number: "))

# prime numbers are greater than 1

if num > 1:
    for i in range(2,num):
        if (num % i) == 0:
            print(num,"is not a prime number")	   
            print(i,"times",num//i,"is",num)
            break
    else:
            #print(num % i)
            print(num,"is a prime number")
            
# if input number is less than
# or equal to 1, it is not prime
else:
   print(num,"is not a prime number")



What the heck is that else: statement doing out there, who does it belong to? Smile | :)
AnswerRe: python - tail stuck under the rocks? Pin
dpminusa15-Jul-19 13:55
dpminusa15-Jul-19 13:55 
GeneralVisual FoxPro Devs Needed By Code Magazine Pin
raddevus12-Jul-19 10:48
mvaraddevus12-Jul-19 10:48 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
Kevin Marois12-Jul-19 10:53
professionalKevin Marois12-Jul-19 10:53 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
raddevus12-Jul-19 10:55
mvaraddevus12-Jul-19 10:55 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
Kevin Marois12-Jul-19 11:13
professionalKevin Marois12-Jul-19 11:13 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
Slacker00712-Jul-19 11:44
professionalSlacker00712-Jul-19 11:44 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
User 842012-Jul-19 12:59
User 842012-Jul-19 12:59 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
Ron Anders12-Jul-19 14:17
Ron Anders12-Jul-19 14:17 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
Richard Andrew x6412-Jul-19 15:19
professionalRichard Andrew x6412-Jul-19 15:19 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
RickZeeland12-Jul-19 20:27
mveRickZeeland12-Jul-19 20:27 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
pkfox13-Jul-19 0:44
professionalpkfox13-Jul-19 0:44 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
OriginalGriff12-Jul-19 21:28
mveOriginalGriff12-Jul-19 21:28 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
pkfox13-Jul-19 0:46
professionalpkfox13-Jul-19 0:46 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
OriginalGriff13-Jul-19 1:03
mveOriginalGriff13-Jul-19 1:03 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
pkfox13-Jul-19 1:20
professionalpkfox13-Jul-19 1:20 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
OriginalGriff13-Jul-19 1:37
mveOriginalGriff13-Jul-19 1:37 
GeneralRe: Visual FoxPro Devs Needed By Code Magazine Pin
pkfox13-Jul-19 1:43
professionalpkfox13-Jul-19 1:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.