Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with basic code
#1
I'm very new to this sort of thing, so sorry if this is a dumb question

if (n):
        print(random.choice(a))

if y:
        print (random.choice(t))
Even if I answer with something from list N, it will print an answer from both list a and T, what am I doing wrong?
Reply


Messages In This Thread
Need help with basic code - by Random - Feb-07-2017, 05:58 AM
RE: Need help with basic code - by j.crater - Feb-07-2017, 06:22 AM
RE: Need help with basic code - by Random - Feb-07-2017, 06:27 AM
RE: Need help with basic code - by j.crater - Feb-07-2017, 06:45 AM
RE: Need help with basic code - by Random - Feb-07-2017, 07:02 AM
RE: Need help with basic code - by buran - Feb-07-2017, 07:03 AM
RE: Need help with basic code - by tannishpage - Feb-08-2017, 04:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  List index out of range error when attempting to make a basic shift code djwilson0495 4 3,034 Aug-16-2020, 08:56 PM
Last Post: deanhystad
  Writing a basic shift code djwilson0495 2 2,302 Aug-16-2020, 01:52 PM
Last Post: djwilson0495
  Problem with Basic Rock Paper Scissors code BirinderSingh 3 2,488 Sep-13-2019, 03:28 PM
Last Post: ichabod801
  basic code help chche5 4 5,472 Feb-17-2018, 10:24 PM
Last Post: chche5
  Basic Doubt in code prateek3 6 4,939 Aug-19-2017, 01:05 PM
Last Post: ichabod801
  Basic code help crawlinkingsnake 2 3,507 Jan-16-2017, 11:03 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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