Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

Ok, it's a new day, and I got this working finally. At least I don't see any issues with it. import random print("") def target_num(): dice = [0, 0, 0] for x in range(3): dice[x] =...
jonstryder Homework 14 6,245 Aug-08-2019, 07:38 PM
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

(Aug-08-2019, 01:43 AM)ichabod801 Wrote: You've got your query loop inside your die roll loop. You need to roll the dice and then ask the question (or vice versa). As it is you are asking the questi...
jonstryder Homework 14 6,245 Aug-08-2019, 06:34 AM
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

(Aug-07-2019, 06:22 PM)ichabod801 Wrote: The error you are getting is what the assignment talks about with validating user code. You need to validate the input before using it. I don't know what you...
jonstryder Homework 14 6,245 Aug-07-2019, 08:09 PM
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

(Aug-06-2019, 10:57 PM)ichabod801 Wrote: I might just loop through what do you need to hit and how many damage dice. Like a helper for a DM running multiple monster attacks. Ok, I've written somethi...
jonstryder Homework 14 6,245 Aug-07-2019, 05:48 PM
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

(Aug-06-2019, 10:57 PM)ichabod801 Wrote: (Aug-06-2019, 10:45 PM)jonstryder Wrote: Start by entering the number needed to hit, the random number is rolled, totaled, then displays if you hit or not?...
jonstryder Homework 14 6,245 Aug-06-2019, 11:10 PM
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

(Aug-06-2019, 10:13 PM)ichabod801 Wrote: Okay, but I don't think your teacher is going to accept a loop that doesn't do anything and isn't needed. What about having them enter the number they need t...
jonstryder Homework 14 6,245 Aug-06-2019, 10:45 PM
    Thread: Lab Assignment with Array's & Loops
Post: RE: Lab Assignment with Array's & Loops

(Aug-06-2019, 07:35 PM)ThomasL Wrote: With regards to your first code snippet: You don´t need the variable dice_roll as you don´t use it and why do you compare the input with an empty string? What i...
jonstryder Homework 14 6,245 Aug-06-2019, 08:46 PM
    Thread: Lab Assignment with Array's & Loops
Post: Lab Assignment with Array's & Loops

Well I'm at a loss on this one now, and of course it doesn't help that I'm not that good at python. I got a lot of good help with the last assignment I posted on here, so I'm back again, doing someth...
jonstryder Homework 14 6,245 Aug-06-2019, 06:17 PM
    Thread: Trouble with Loops in lab assignment
Post: RE: Trouble with Loops in lab assignment

So one problem I see with the code ThomasL is that I have no idea what "Format" is and how it is used. As well as the use of "end" in the coding you supplied. These are things we haven't covered in ...
jonstryder Homework 6 3,462 Jul-28-2019, 04:51 PM
    Thread: Trouble with Loops in lab assignment
Post: RE: Trouble with Loops in lab assignment

Thanks ThomasL, I'll type this in and see how it works.
jonstryder Homework 6 3,462 Jul-28-2019, 03:18 PM
    Thread: Trouble with Loops in lab assignment
Post: RE: Trouble with Loops in lab assignment

I've glanced through it, but it doesn't seem to cover putting a loop in a module or the second half of what I'm trying to do. While I see this as helpful, it's also not helpful. Coming up with valid...
jonstryder Homework 6 3,462 Jul-28-2019, 02:43 AM
    Thread: Trouble with Loops in lab assignment
Post: Trouble with Loops in lab assignment

Hi, so this is my first time in this forum. I'm new to python coding, and so far the majority of my coding experience has been in regards to web design/development so python has been a massive depart...
jonstryder Homework 6 3,462 Jul-28-2019, 12:33 AM

User Panel Messages

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