Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vairables
#1
I am trying to write pseudocode; however, I don't understand how calling variables work in Python. My goal is to ask a user to enter a string, which I would like to store as a variable. The caveat is the user's entry is the variable that I would like to store as. Is there a way to use that user's entry and somehow call it later? I think I kind of just answered my own question, but I am curious to know what is possible.

Second part to this problem is if I am creating an iteration, such as a 'for' loop, which repeats x number of times as determined by a user's input (input x times to repeat loop), how can a variable be assigned if there are x number of loop iterations? Is there a way to program Python to assign a number to the variable based on the number of iterations, and then use that code to define the variable? I think I just answered my own question again. However, I am not sure. Thanks in advance for any help with this.
Reply


Messages In This Thread
Vairables - by Phynomeagle - Feb-05-2019, 02:54 PM
RE: Vairables - by Larz60+ - Feb-05-2019, 03:29 PM
RE: Vairables - by ichabod801 - Feb-05-2019, 03:51 PM
RE: Vairables - by Phynomeagle - Feb-05-2019, 04:01 PM

Forum Jump:

User Panel Messages

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