Python question

Python question.

How the fuck do I get my output to display the results of my functions?

def display () :
print (" :",userName1)
return ()

def NameMain () :
print ("Hello! Welcome to 'The Good Price Hotel' Please enter your name!")
print ("")
userName = input ("Enter your name: ")
userName1 = userName.upper()
print ("")
print ("Hello", userName)
print ("")
return ()

NameMain ()
display ()
PLEASE HELP

Attached: 85d18bad58b242d5c916b96ebe994853.jpg (1076x1013, 107K)

Fuckin nerd

Attached: 43595987_1263892687086753_5200697734616580096_o.jpg (1080x1080, 82K)

Attached: 1549125065225.jpg (683x1024, 77K)

None of your code makes any sense, no computer that respects itself would let this run. Pay more attention in class.

Go learn about:
- string formatting
- passing around and updating variables
- passing variables between functions

this is python3. shame on you if you're using 2.
def NameMain():
print("Hello! Welcome to 'The Good Price Hotel' Please enter your name!\n")
userName = input("Enter your name: ").upper()
print ("Hello {}\n".format(userName))
return userName

def main():
userName = NameMain()
print("Printing username again\n")
print(userName)

if __name__ == "__main__":
main()

spacing and indent is all fucked up, you're gonna have to figure it out

My fucking teacher is garbage. This is my first time ever learning programming and this guy hasn't shown anything that seems of use. They make us use python 2 btw. Fucking community college bullshit.

dont care bout this shit. Post more kaybear

sucks man. if your teachers garbage and you need to learn python (its really good to know) go do some books in your free time instead of spilling seed to bowsette.

https github dot com slash joaoventura slash full-speed-python slash releases slash

This book is for python2. There's a book for python3 that's just as good.
https learnpythonthehardway dot org slash book

Python is a terrible first language. You should be learning basics before using sugary magic pixiedust bullshit.

Attached: system engineer.png (1343x2029, 900K)

There are too many fucking programmers already. You will not get a job.

Thanks for the help man. I still can't get it to run though.

I am starting to realize going to a shit hole community college is not good for me. Might transfer somewhere less shitty.

I have a full time job as a network structural engineer.

Attached: 454.png (618x872, 947K)

Attached: 23453.png (696x866, 1.05M)

Can you clean all of your customer complaint tickets using regular expressions, classify them using conditional logic and dictionaries, and then build a model that accurately predicts why people hate your roach motel?

No.

Attached: 45444.png (599x870, 711K)

if you intend to do network engineering with what you're learning they're automating a lot of it in python. don't get all faggy and try to be fancy. pythons good for getting stuff done, maybe not so good for jerking yourself off in front of other fat guys about how smart you are.

the code i sent runs, you have to have your spaces wrong. 4 spaces before every line that comes after a ":"

[code]
def NameMain():
print("Hello! Welcome to 'The Good Price Hotel' Please enter your name!\n")
userName = input("Enter your name: ").upper()
print ("Hello {}\n".format(userName))
return userName

def main():
userName = NameMain()
print("Printing username again\n")
print(userName)

if __name__ == "__main__":
main()
[code]

fuck this god awful caveman website.

pastebin dot com slash pv86sfpp

newfag
 punkass
  roodipoo
    nigger

this is me the one thats helping you again. do you have any pictures of that black girls butthole

Grab a copy of "Starting out with Python; Third Edition by Tony Gaddis"

Great for beginners and has assignments through out every chapter to practice.

Sadly no. I don't think she does nudes.

I will look into it.

Attached: 121.png (875x872, 1.47M)

Python2 isn't really that bad. I still use it just because linux auto-completes python instead of python3 and some vintage programs only work with python. They're pretty much the same, just need to use different libraries that will let you do the same thing. Good luck! Don't worry about people saying python is a bad program to learn first. Most of us oldfags learned bottom->up since only fortran was the most advanced language out there.

#Constants

Gratuity = .15
Tax = .11

def NameMain () :
print ("Hello! Welcome to 'The Good Price Hotel' Please enter your name!")
print ("")
userName = input ("Enter your name: ")
userName1 = userName.upper()
print ("")
print ("Hello", userName)
print ("")
return userName

def dayStayMain () :
dayStay = int (input ("Please enter the number of days you will be staying at our hotel!: "))
print ("")
print ("We have differnt types of rooms to choose from!")
print ("Please select from our list!")
print ("")
print ("A. Standard room $125.95")
print ("B. Deluxe Room $295.95")
print ("C. Suite $895.95")
print ("")
return ()

def roomChooseMain () :
roomChoose = input ("Please input Room type! Choose A, B, or C!: ")
if roomChoose == "A" or "a" :
roomCost = 125.95
roomType = "Standard room"
roomType1 = roomType.lower()
elif roomChoose == "B" or "b":
roomCost = 295.95
roomType = "Deluxe Room"
roomType1 = roomType.lower()
elif roomChoose == "C" or "c" :
roomCost = 895.95
roomType = "Suite"
roomType1 = roomType.upper()
else :
print ("Incorrect room type! Please choose from A, B, or C!")
print ("")
return ()

def dePositMain () :
dePosit = float (input ("Please enter a deposit!: "))
return ()

def roomTotalMain () :
roomTotal = roomCost * dayStay
return ()

def amtGratuityMain () :
amtGratuity = roomTotal * Gratuity
return ()

def amtTaxMain () :
amtTax = (amtGratuity + roomTotal) * Tax
return ()

def amtTotalMain () :
amtTotal = roomTotal + amtTax + amtGratuity
return ()

def amtDueMain () :
amtDue = amtTotal - dePosit
return ()

def displayOutput () :
print ("")
print (" The Good Price Hotel ")
print ("")
print ("Customer Name: ", format (userName))
print ("")
print ("Number of Days: ", dayStay)
print ("")
print ("Type of Room: ", format (roomType1))
print ("")
print ("Cost per Night: ", roomCost)
print ("")
print ("Gratuity Amount: ", round (amtGratuity, 2))
print ("")
print ("Tax Amount: ", round (amtTax, 2))
print ("")
print ("Deposit Amount: ", round (dePosit, 2))
print ("")
print ("Amount Due: ", round (amtDue, 2))
return ()

NameMain ()
dayStayMain ()
roomChooseMain ()
dePositMain ()
displayOutput ()

Here is my full code. I am unable to display my output function. I just get this error.

Traceback (most recent call last):
File "E:/School/Final Project/derp try 4..py", line 96, in
displayOutput ()
File "E:/School/Final Project/derp try 4..py", line 75, in displayOutput
print ("Customer Name: ", format (userName))
NameError: name 'userName' is not defined

they learn bottom up cause their bottoms up when they're taking fat cocks.

this guys right. python2 is fine, but everyones going to 3 anyway. theres gonna be some kind of legacy support for a long ass time, but all good things have to end so might as well jump on the python 3 train eventually. once you learn one 80 percent of the time for simple scripting your just changing how you print things.

What do you gain out of this growing crystals bullshit?

The rest of the inputs work fine, it is getting the display to show.

Attached: 221.png (631x871, 1.09M)

Attached: 662.png (598x891, 993K)

you need to read about passing variables between functions. what you should be doing is something like this....

[code]
def displayOutput(NameMain, dayStayMain, roomChooseMain, dePositMain):


NameMain = NameMain()
dayStayMain = dayStayMain()
roomChooseMain = roomChooseMain()
dePositMain = dePositMain()
displayOutput(NameMain, dayStayMain, roomChooseMain, dePositMain)
[/code]

Thank you for the help bro, I have to get some sleep man. Got to be at work in 4 hours... Here is one more pic for the road.

Attached: tumblr_nwlsf20Jjr1uw6xp9o1_1280.jpg (996x1500, 164K)