Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Random function
Post: Random function

I don't understand my error x = random (1,5) if x % 2 == 0: print ("even") else: print ("odd")
sh98765 General Coding Help 1 1,948 Mar-11-2019, 02:00 AM
    Thread: while loop
Post: RE: while loop

The code is provided by the teacher and I think it's incorrect. I just wanted to confirm. Thank you
sh98765 General Coding Help 5 2,745 Mar-10-2019, 10:30 PM
    Thread: while loop
Post: RE: while loop

x=1 y=1 while y>=30: x= x+1 y=y+x print (x)I'm getting 1 as an output. Is that correct because options for this coding are 7, 8, 9, 10 and none of these are the output I'm getting
sh98765 General Coding Help 5 2,745 Mar-10-2019, 10:19 PM
    Thread: while loop
Post: while loop

I'm very new to python and would like to know what will be the output of the below code. x=1 y=1 while y>=30 x= x+1 y=y+x print (x)I'm getting 1 as an output. I don't understand why. Thanks in adv...
sh98765 General Coding Help 5 2,745 Mar-10-2019, 09:16 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020