Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 9301

Vassilios' Python Help-desk - Ask your questions!

by Vassilios - 29 April, 2019 - 11:33 PM
This post is by a banned member (Vassilios) - Unhide
Vassilios  
Supreme
270
Posts
38
Threads
5 Years of service
#9
This is a bump
[Image: 1724cf64e5e5b1b73c593976bf4643a6.png]
This post is by a banned member (Vassilios) - Unhide
Vassilios  
Supreme
270
Posts
38
Threads
5 Years of service
#10
This is a bump
[Image: 1724cf64e5e5b1b73c593976bf4643a6.png]
This post is by a banned member (hellasida) - Unhide
hellasida  
Registered
10
Posts
0
Threads
5 Years of service
#11
Code:
import random
import string
High = "High"
Low = "Low"
yes = ('yes', 'Yes', 'y')
answer = None
points = 0
hol = int(input("Make Your Selection:\n1. High\n2. Low\n3. Quit\n"))
randomnum = random.randint(1,1000)

answer = input("Do you still want to play? Y/N ")


def main():

   global points
   global High
   global Low

print("Any number under 500 is low, 501 to 1000 is high")
hol
print("points: " + str(points))

if randomnum >= 500:
   print(randomnum)
   print(High)
   if hol == 1:
       points += 1
       print(points)
   else:
       points -= 1
       print(points)

elif randomnum <= 501:
   print(randomnum)
   print(Low)
   if hol == 2:
       points += 1
       
       print(points)
   else:
       points -= 1
       print(points)
else:
   print(randomnum)
   print(High)
   print("points: " + points)

def end():

   answer = input("Do you want to play again? Y/N ")

while yes in answer:
   if yes in answer:
      main()
      answer = input("Do you want to play again? Y/N ")
      if "n" in answer:
          break
if "n" in answer:
   exit()

main()


end()


             
   
So simple high low game. User picks high or low, it adds 1 or minus 1 point for correct answer.

Upon executing my code it goes from the first input straight to the 2nd. And even if I put "n" or "y" in my 2nd input it gives me a name error. I'm still learning. Can you tell me where my mistakes are at?
This post is by a banned member (TeeGrizley) - Unhide
115
Posts
43
Threads
6 Years of service
#12
(29 April, 2019 - 11:33 PM)Vassilios Wrote: Show More
Vassilios' Python Help-desk

Greetings! I am starting this help-desk for anyone that is currently using Python or is interested in it. I have been using Python for around a year on or so on the daily. I have used countless libraries including Requests, Panda, the Discord API and more. I have also made my own APIs for services. Feel free to ask me any questions whether that involves an error with a library or just your code and I will do my best to assist you with your problems. I am also available in DMs if you do not wish to disclose your problem here.

If you could please do use the format down below so your problem is concise and it's easier to read it. If there are long errors then please do attach them below. Also if your code includes API keys, passwords or anything of that sort, censor them.

Code:
[list]
[*][b]Situation: [/b]
[*][b]Question: [/b]
[/list]

Any good places where I can learn it fast as fuck ?
 
This post is by a banned member (Vassilios) - Unhide
Vassilios  
Supreme
270
Posts
38
Threads
5 Years of service
#13
(14 May, 2019 - 06:33 PM)TeeGrizley Wrote: Show More
(29 April, 2019 - 11:33 PM)Vassilios Wrote: Show More
Vassilios' Python Help-desk

Greetings! I am starting this help-desk for anyone that is currently using Python or is interested in it. I have been using Python for around a year on or so on the daily. I have used countless libraries including Requests, Panda, the Discord API and more. I have also made my own APIs for services. Feel free to ask me any questions whether that involves an error with a library or just your code and I will do my best to assist you with your problems. I am also available in DMs if you do not wish to disclose your problem here.

If you could please do use the format down below so your problem is concise and it's easier to read it. If there are long errors then please do attach them below. Also if your code includes API keys, passwords or anything of that sort, censor them.

Code:
[list]
[*][b]Situation: [/b]
[*][b]Question: [/b]
[/list]

Any good places where I can learn it fast as fuck ?
https://automatetheboringstuff.com/chapter0/
[Image: 1724cf64e5e5b1b73c593976bf4643a6.png]
This post is by a banned member (hellasida) - Unhide
hellasida  
Registered
10
Posts
0
Threads
5 Years of service
#14
Any response on my question?
This post is by a banned member (S2Q) - Unhide
S2Q  
Infinity
112
Posts
44
Threads
5 Years of service
#15
  • how to use discord embed value in codebox like as < code > sometext < / code > ?

    this sample code : 

    Code:
    embed.add_field(name='SOMETEXT', value=ARSG, inline=False)

    value grabbed from some print function

    and how to implementation like this ?
    see screenshot 

    [Image: gk6NT.png]

    sorry if my question make u confused

    *screenshot was made with discordbot embed generator

    thanks advance

:dancinggirl: Respect To Me With U R Like  :dancinggirl:
 
[Image: 68747470733a2f2f692e696d6775722e636f6d2f...6e2e676966]
 
!! Leecher Will Be Reported !!
This post is by a banned member (Vassilios) - Unhide
Vassilios  
Supreme
270
Posts
38
Threads
5 Years of service
#16
I am opening this again.
[Image: 1724cf64e5e5b1b73c593976bf4643a6.png]

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 3 Guest(s)