Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Taking user input
#6
(Sep-19-2018, 08:14 AM)gruntfutuk Wrote: Don't know exactly what you need, but perhaps you might consider a slightly different approach of showing a table of the various configurations, and letting the user pick the variation concerned. You can then do the inputs for that configuration.

(If you are outputting graphically rather than to a console, you could offer to pick from pictures rather than text.)

I thought about a gui where the user could input the info, but i just need to practice more lol. I have been using python for about 1 day, and thought that doing something that i could use would be a good way to do it. I have made a simple version of what i am trying to do, but you have to enter all 4 sides separately and get the cut list for each side. I want people to enter all the info about the transition, and the program spits out the cut list for all 4 sides. So a gui might be the way to go, but we will see where it takes me kinda just having fun with it to help me learn python, and hopefully make something that people or atleast i can use.

offset_left_or_right = input("Which side of the transition is offset? Left or Right? ")
query = "Is bottom {} going up to the left or right? "
bot_corner_to_left_or_right = input(query.format(offset_left_or_right))
so with this code i can now bot_corner_to_left_or_right and the program will know that if they selected left or right, and i could now use bot_corner_to_left_or_right in another command and it will know what is the input?

Also yes there is a ton that this program will have to do. i lot of info with need to put input to figure which way the transition is offsetting which will all change how the entire cut list for the transition is figured out.

[Image: url?sa=i&rct=j&q=&esrc=s&source=imgres&c...9888061613]

so this is a transition a very basic picture, and the picture below is basically what i want to find

[Image: 133606.jpg]

The very basic way i can put this is that a transition is like a trapezoid, and each side can offset. So basically you want to find the true length(hypotenuse) of each side so you know how big of piece of metal you need to cut. in order to find the true length you have to know the offset of the side of the metal(rise) and the height of the transition(run). then you solve for the true length(hypotenuse). However with each side offsetting the program has to know which way each side is offset and the height of the fitting, and rather than ask about each individual side i want them to just input only the info that is needed for the program to figure out all the sides for the user. That is only part of it. When you find the true length that is only the height of the fitting. So you need to know the width of the stretchout that i was why i need to know if bot left corner is offsetting up to the right, what the top of the fitting is doing(offsetting up or down), how far the fitting is offsetting, and which way the arrow is pointing so i know if the top or bottom is what is offsetting up or down lol. There is a lot to do lol i expect this to take me a long time to figure out, but i figured it would be a great way to learn
Reply


Messages In This Thread
Taking user input - by mtndewwarrior - Sep-19-2018, 03:03 AM
RE: Taking user input - by ichabod801 - Sep-19-2018, 03:20 AM
RE: Taking user input - by mtndewwarrior - Sep-19-2018, 03:42 AM
RE: Taking user input - by gruntfutuk - Sep-19-2018, 08:14 AM
RE: Taking user input - by mtndewwarrior - Sep-20-2018, 12:35 AM
RE: Taking user input - by ichabod801 - Sep-19-2018, 02:20 PM
RE: Taking user input - by ichabod801 - Sep-20-2018, 01:40 AM
RE: Taking user input - by mtndewwarrior - Sep-20-2018, 03:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  WHILE LOOP NOT RETURNING USER INPUT AFTER ZerroDivisionError! HELP! ayodele_martins1 7 1,124 Oct-01-2023, 07:36 PM
Last Post: ayodele_martins1
  restrict user input to numerical values MCL169 2 960 Apr-08-2023, 05:40 PM
Last Post: MCL169
  user input values into list of lists tauros73 3 1,108 Dec-29-2022, 05:54 PM
Last Post: deanhystad
Information How to take url in telegram bot user input and put it as an argument in a function? askfriends 0 1,145 Dec-25-2022, 03:00 PM
Last Post: askfriends
Question Take user input and split files using 7z in python askfriends 2 1,151 Dec-11-2022, 07:39 PM
Last Post: snippsat
Sad how to validate user input from database johnconar 3 1,992 Sep-11-2022, 12:36 PM
Last Post: ndc85430
  How to split the input taken from user into a single character? mHosseinDS86 3 1,227 Aug-17-2022, 12:43 PM
Last Post: Pedroski55
  Use pexpect to send user input alisha17 0 1,941 May-10-2022, 02:44 AM
Last Post: alisha17
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 1,529 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  Matplotlib - close multple plots with user input Positron79 0 1,781 Dec-01-2021, 05:26 PM
Last Post: Positron79

Forum Jump:

User Panel Messages

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