[Solved] Ask the user for its name using raw_input [closed]

This is one of the easiest problem ever. This is my solution (since you tagged your post for Python 3): name = input(‘Enter your name: ‘) print(“Welcome”, name) For Python 2, just change input to raw_input, and remove the parenthesis of the print function. 1 solved Ask the user for its name using raw_input [closed]

[Solved] How to create a UI in Python [closed]

For start i suggest for you to start with Tkinter library (built in library). This is a simple program using Tkinter gui. import Tkinter class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) self.parent = parent self.initialize() def initialize(self): self.grid() self.entryVariable = Tkinter.StringVar() self.entry = Tkinter.Entry(self,textvariable=self.entryVariable) self.entry.grid(column=0,row=0,sticky=’EW’) self.entry.bind(“<Return>”, self.OnPressEnter) self.entryVariable.set(u”Enter text here.”) button = Tkinter.Button(self,text=u”Click me !”, command=self.OnButtonClick) button.grid(column=1,row=0) … Read more

[Solved] How do I add ‘if’ commands inside a ‘why’ loop [closed]

It is because the if statement is not indented properly and its condition is not specified as a string ‘help’: while 1: userCommand = input(‘Type a command (type \’help\’ for syntax): ‘) if userCommand == ‘help’: print (‘flight: this command will be used to list a flight’) break solved How do I add ‘if’ commands … Read more