wn.onkey(h1, w) Has Microsoft lowered its Windows 11 eligibility criteria? head.setx(x + 20) breadcashback com accept; tess.speed(10), pen = t.Turtle() Research team didn't take internship announcement well. The following works for me: Thanks for contributing an answer to Stack Overflow! Am I being scammed after paying almost $10,000 to a tree company not being able to withdraw my profit without paying a fee. Now that the turtle graphics are listening for key presses, how will you tell the program to do something through key presses? Thanks for contributing an answer to Stack Overflow! You can fix this by taking control of when the drawing updates itself. By default, the turtle points to the right. (4) Make a program to change turtle color. Form the object (box - made of colored square). food.color(purple) if segment.distance(head) < 20: is there a chinese version of ex. food.shape(circle) y = 260 enemy.direction = "stop", # Hide the segments pen.write(Score P1: 0| TRON | Score P2: 0, align=center, font=(comic sans, 24, normal)), def move(): time.sleep(delay), This wont work for me How can I delete a file or folder in Python? You can create this key binding using the onkeypress() function in the turtle module. How do I concatenate two lists in Python? Moving turtle object using keyboard is easy. How can I access environment variables in Python? head.goto(-200,100), # Snake food This allows you to make your program interactive. ws = Screen () is used to make the screen. How did Dominion legally obtain text messages from Fox News hosts? if head.xcor()>290 or head.xcor()290 or head.ycor()290 or enemy.xcor()290 or enemy.ycor()<-290: Why is there a memory leak in this C++ program and how to solve it, given the constraints? By using our site, you Given below are two approaches that deal and discuss how to create a graphics keyboard. How can I remove a key from a Python dictionary? I think that You can go further with this. How to upgrade all Python packages with pip. pen.write("Score P1: {} Score P2: {}".format(score_p1, score_p2), align="center", font=("Courier", 24, "normal")), # Check for a collision with the food Define two instances for the turtle one is a pen and another is the head. Now that we . Full Stack Development with React & Node JS(Live) Java Backend . You can also make the turtle change colour whenever it turns left. food.goto(x,y), # Add a segment Python turtle is great for 2d graphics in python. Then put under the above code before win.mainloop (). It provides drawing using a screen (cardboard) and turtle (pen). Defining a whole function for a single command doesn't seem right, and we can't just do, Like in the most upvoted answer, the solution is to use lambda, where the error causing code right above can be corrected to. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. x = random.randint(-290, 290) y = snake.ycor() turtle.bgcolor ("black") is used to give black color to the background. It takes 2 arguments, the first is a function (that is what the moveright, moveleft parts are) and the second argument is a string relating to the desired key on the keyboard. when the love of your life dies quotes; p0420 code honda odyssey 2011; pole dancing classes louisville ky; vmware horizon failed to logoff session. Sorry about the punctuation(Im just never bothered when typing in computers). snake.setx(x 20), if snake.direction == starboard: If a law is new but its interpretation is vague, can the courts directly ask the drafters the intent and official interpretation of their law? tur.ondrag (drag) is used to drag the cursor and follow the mouse. Thanks for contributing an answer to Stack Overflow! wn.title(TRON) Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. Thanks a ton with the onkey() command fix it works with w,a,s,d! To move turtle, there are some functions i.e forward(), backward(), etc. We need 4 dedicated functions. In this third tutorial we will add methods to our Paddle class to move the paddles up and down when player A uses the W (up) and S (down) keys and player B uses the up and down arrow keys. When the players use the relevant keys on the keyboard we will call . The setheading() method changes the orientation of the turtle to the given angle. The turtle module allows us to detect when the user has hit certain keys on the keyboard or moved/clicked the mouse. How can I delete a file or folder in Python? This is where I am stuck, I don't know how to make the turtle follow The function definition you have just added is just that, a definition. The turtle () method is used to make objects. Key for understanding here is that You don't have access to any absolute here. Now, let's get into how we can actually call these function during run-time when a key is pressed. First we must set up two more functions that will run when the mouse button is clicked. y = enemy.ycor() What is Python with Turtle? Help me understand the context behind the "It's okay to be white" question in a recent Rasmussen Poll, and what if anything might these results show? snake.direction = down, def go_left(): head.goto(-50,0) Turtle is a pre-installed module and has inbuilt commands and features . I get no error codes but the arrow keys and wasd doesnt work. time.sleep(1) Remember that any code you run needs to come before the turtle.done () line. pen.shape(square) as in example? Set visibility- The showturtle() method sets the visibility of the turtle. This will make the player change colour and turn left by 10 degrees, but it will happen once when the program runs the line that has turn_left() on it. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. To learn more, see our tips on writing great answers. Have fun creating great animations and games using turtle in Python. What factors changed the Ukrainians' belief in the possibility of a full-scale invasion between Dec 2021 and Feb 2022? if snake.direction == up: This is a function, or more accurately a method, that belongs to the Screen() object. A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. segments.clear() To make the turtle move in Python, we can use the forward() function. x = enemy.xcor() turtle.fd(600) ShareTo download a file in a Python Flask app, you can use the send_file function provided by Flask. segments2.clear(), # Update the score display If fun is None, event bindings are removed. forward (150) is used to move the turtle in the forward direction. new_segment.penup() turtle.begin_fill() vertical_lines(600), game_started = False How to write an empty function in Python - pass statement? y = head.ycor() Data Structures & Algorithms in Python; Explore More Self-Paced Courses; Programming Languages. The listen() method sets focus on the turtle screen to capture events. Turtle is an inbuilt module in python. It doesnt work on Python 2 only on Python 3. def go_down(): return This is similar to the previous example with the addition of few more keys. How to derive the state of a qubit after a partial measurement? Our first step is to set up a few functions that we will call when certain keys are pressed. pen.write("Score P1: {} Score P2: {}".format(score_p1, score_p2), align="center", font=("Courier", 24, "normal")), # Check for head collision with the body segments Why was the nose gear of Concorde located so far aft? import turtle RV coach and starter batteries connect negative to chassis; how does energy from either batteries' + terminal know which battery to flow back to? snake.direction = left, def go_starboard(): Not the answer you're looking for? This tells the turtle to move 75 steps beginning from the middle of the canvas. def move(): Here you use .move_ip(), which stands for "move in place," to move the current Rect.. Then you can call .update() every frame to move the player sprite in response to keypresses. By using our site, you A simple Python feedparser script - Raspberry Pi; Arrays in Python; Calculator Python - Loop - Addition - Subtraction; Current time/date (2.7) Die in python - End script running; Foreach using array - Python; Functions in Python; Get date/time individually; Git Diff - Find the new commits that will be merged; if else - (elif) basic t.speed(10), def vertical_lines(s): Nov 24 ; How to check whether a variable is a class or not? pen.hideturtle() Now that we can move the turtle around with the arrow keys we want to be able to change its color when we click the left mouse button and stamp it when we click the . Or you can use Snipping Tool also. I could not drive the turtle with the arrow keys [closed] How to use turtle_teleop_key to control specific turtle? Now we have added keys to change the color of the line. Check out our sister site The Python Coding Book, for in-depth guides on all things Python, or follow us on Twitter @codetoday_ and @s_gruppetta_ct, We offer a FREE intro lesson to Python for kids live online. if enemy.heading == up: Definitely check YouTube tutorial on How to Move Turtle with Arrow Keys. Find centralized, trusted content and collaborate around the technologies you use most. You can see that since you only need the name of the function here, you put in turn_left without the () that we often put after a function when we want it to run. To listen for events we type turtle.listen(). Let's say you want a new turtle to be created every time a key is pressed; you will need to define a function like so (you can use lambda for the function, but for now, let's stick to def): Keep in mind that you shall not pass any positional arguments into the brackets when defining the function, as you will not be able to pass your arguments in when you use the function, resulting in an TypeError. Please bear in mind that it takes some time for the turtle to actually turn, so don't press keys, click them. Python Turtle - Move Turtle with Arrow Keys. (LogOut/ t.pensize(3) "space") Bind fun to key-release event of key. Note: if using a web-based platform, you may need to replace onkeypress with onkey. Asking for help, clarification, or responding to other answers. Fill in your details below or click an icon to log in: You are commenting using your WordPress.com account. To create this Python game, we will use the turtle module. head.shape(circle) Thanks for the quick reply it may be a problem on my end, but when I put in the code the turtle pops up on my screen but the keys don't move the turtle. Ackermann Function without Recursion or Stack. There are much better ways to do this. The turtle will then exit the loop. pleasehelpmeicantcode, I've read your code VFQ142 (written in . The onkey() method invokes the method specific to the captured keystroke. we want to be able to control alfred with the arrow keys, so we will put down . The . How can I move the turtle every few seconds without using time.sleep()? Does Python have a string 'contains' substring method? color ('orange', 'yellow') is used to give the orange and yellow color to the turtle. Was Galileo expecting to see so many stars? Making statements based on opinion; back them up with references or personal experience. segment.goto(1000, 1000), # Clear the segments list Here's an example: In this example, the download_file function specifies the path [] RuntimeError: Working outside of application context 2023-02-03. Nov 24 'for' loop in one line in Python Nov 24 import time How to add a title to a Matplotlib legend? Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, call me an idiot, though I can't seem to implement that into my program. Example 2: Move the Object (box) Following steps are used: Import Turtle package. segments[0].goto(x,y), # Move the end segments first in reverse order x = snake.xcor() # draw vertical lines I need to do so using these two def. import turtle as t, # Set up the screen In this article we will see how we can make design in PyGame with help of keys such that design i.e marker moves horizontally when pressing the right arrow key or left arrow key on the keyboard and it moves vertically when pressing up arrow key or down arrow key. It also recommends putting imports from different modules on separate lines and not using unnecessary parenthesis. Note: if using the web-based editor, you will need to replace the function onkeypress in the code below with onkey. Can I use a vintage derailleur adapter claw on a modern derailleur, Clash between mismath's \C and babel with russian, Rename .gz files according to names in separate txt-file. Remember that any code you run needs to come before the turtle.done() line. operating simple car model gazebo using keyboard. Taking what we've learned, let's see them in action: Can you guess what this does? You can modify the code above to add this function. . Define the functions for the up, down, left, right movement of the turtle. When you run programs that have a key binding such as this one, on some computers, you will need to first click on the window where the animation or game is running to make that window active before you can use the keys on your keyboard to control the Turtle. x = head.xcor() it should but the onkey detects clicks even if u dont click btw im using python 3.7.2 and eveny when i changed onkey to onkeypress still dont work dunno why pls reply. (adsbygoogle = window.adsbygoogle || []).push({}); Now that we can move the turtle around with the arrow keys we want to be able to change its color when we click the left mouse button and stamp it when we click the right. Nov 24 ; Repeating triangle pattern in Python Nov 24 ; Is it possible to get a list of keywords in Python? t.pensize(3) You want to be able to call the function turn_left() whenever a certain key on the keyboard is pressed, let's say the left arrow key. Whether you want to write an animation that needs some input from the user, or you're writing a game, you'll need to be able to link certain actions to certain keypresses. You have mentioned what you want to achieve but have not explain the issue(s) you are encountering with your script. Is Koestler's The Sleepwalkers still well regarded? pen.write(Booting Up, align=center, font=(comic sans, 24, normal)), def horizontal_lines(s): time.sleep(1) The second argument is a string that represents the key on the keyboard that you wish to use. At what point of what we watch as the MCU movies the branching started? Create window- The Screen() method creates a canvas for drawing. Head is for telling which key is currently pressed. The open-source game engine youve been waiting for: Godot (Ep. wn.onkey(h2, a) pen = t.Turtle() y = segments2[index-1].ycor() 542), How Intuit democratizes AI development across teams through reusability, We've added a "Necessary cookies only" option to the cookie consent popup. x = snake.xcor() We can listen for events and trigger functions to run if we "hear" the event. wd.update() . Python turtle Handling with keypress(arrowkey), Engineering Books Quick Link(pdfversion), Computing Inverse matrix of a Givenmatrix, Finding sum/nth terms of a given series:(valid for all integerseries), first and second derivative test (max. text.color(white) If you're looking for handling multiple keypresses at once, This should work, but I downvoted because of the implementation (last_pressed + hardcoded turning). Python Turtle module is a graphical tool that can be used to draw simple graphics on the screen using a cursor. --> I made a tool for this. use python turtle to navigate the turtle using the arrow keys "a") or key-symbol (e.g. In the future, please provide more information about what's not working and the error messages you get. head.direction = "stop", # Hide the segments import random In the respective up, left, right and down functions set the arrow to move 100 units in up, left, right, and down directions respectively by changing the x and y coordinates. i think everything else is right but when you run the code, i think it would work if you took out the brackets and done it like this: wd.onkey(go_down,s) for segment in segments2: If a zombie collides with a bullet, we delete the zombie from the list and increase the score by 1. if zomb.colliderect (blue_tank): game_over = True. a) or key-symbol (e.g. - Enables drawing - .pensize(int) pen.penup() Is a hot staple gun good enough for interior switch repair? Now is the magic. The code is not ideal but it works and you can work on it. This python turtle tutorial covers using user key presses and events to move a turtle object around the screen. I was wondering can anyone help me with this code? You all have great answers. But if the zombie collides with the tank, the game is over. This function is used to bind fun to the key-release event of the key. A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. food.speed(0) Turtle is a pre-installed module and has inbuilt commands and features that can be used to draw pictures on the screen. t.color(lightblue) t.goto(x, y) How to bind several key presses together in turtle graphics? t.fd(s) y = enemy.ycor() You can now repeat the process to make the player turn right when the right arrow key is pressed. At i = 1 + 1 = 2, the turtle moves forward by 100 units and then turns 90 degrees to the right. We can do this by making a spot (marker) on the respective co-ordinates, which . Is email scraping still a thing for spammers. I would also add a if __name__ == "__main__": guard to allow importing from this module without running the game and follow Python's official style-guide, PEP8, which recommend adding spaces around operators. Manually raising (throwing) an exception in Python, How to upgrade all Python packages with pip. I believe turtle_teleop_key.exe is infected with IDP.Generic. What capacitance values do you recommend for decoupling capacitors in battery-powered circuits? The first argument of onkey() is the function to be called and the second argument is the key. We are substitutingonkey() method withonkeypress() method. time.sleep(1) rev2023.3.1.43269. wn.onkey(h8, Down) You only can change something in relation to your current posisition. Python Turtle was a part of Logo programming language which had similar purpose of letting the users draw graphics on the screen with the help of simple commands. Not the answer you're looking for? How can I find the first occurrence of a sub-string in a python string? If a law is new but its interpretation is vague, can the courts directly ask the drafters the intent and official interpretation of their law? Turtle forward () Function. y = enemy.ycor() new_segment.color("orange") # Reset the delay text.write(Press Space To Start, align=center, font=(comic sans, 24, bold)) Add mainloop() command, it prevents the application from terminating before the user actually clicks the exit option. (LogOut/ Vulnerability in input() function Python 2.x, Ways to sort list of dictionaries by values in Python - Using lambda function, Python | askopenfile() function in Tkinter. The 2 screen.onkeypress lines tell the computer to listen for a pressed key. In this article, we will learn how to draw lines using the keyboard (arrow keys) in turtle graphics. First, create the variable in your setup section. for segment in segments2: Launching the CI/CD and R Collectives and community editing features for How do I change the size of figures drawn with Matplotlib? This tells the turtle to move 75 steps beginning from the middle of the canvas. Set screen with dimensions and color. while True: If you order a special airline meal (e.g. How do I get a substring of a string in Python? for segment in segments: jpeg,. looking turtle_teleop_key script in python. delay = 0.1, # Update the score display t.pd() Also, the thickness of the line is increased by setting the width o the turtle to 5px using the width() method. (3) Create a bitmap of original turtle using Paint program. Run the program and press the arrow key and see what happens. wn.bgcolor(black) Not the answer you're looking for? As you can see, when using the function inside wn.onkey, we do not call it (as in, we did not add brackets on the right side of the function); wn.onkey does it for us. Happy coding! Book about a good dark lord, think "not Sauron". head = t.Turtle() wd.onkey(go_left(),a) wn.onkey(h4, s) In order for the user to be able to interact with the turtle through key presses, we need to let the window listen for key presses. for segment in segments2: First, we got to understand the basics. So, let's begin: First of all, let's create a blank game window and then add a background color to it. Can you explain what is the issue you are encountering with your script? t.pu() turtle.setheading(180) acknowledge that you have read and understood our, Data Structure & Algorithm Classes (Live), Data Structure & Algorithm-Self Paced(C++/JAVA), Android App Development with Kotlin(Live), Full Stack Development with React & Node JS(Live), GATE CS Original Papers and Official Keys, ISRO CS Original Papers and Official Keys, ISRO CS Syllabus for Scientist/Engineer Exam, Adding new column to existing DataFrame in Pandas, How to get column names in Pandas dataframe, Python program to convert a list to string, Reading and Writing to text files in Python, Different ways to create Pandas Dataframe, isupper(), islower(), lower(), upper() in Python and their applications, Python | Program to convert String to a List, Check if element exists in list in Python, How to drop one or multiple columns in Pandas Dataframe, Imshow with two colorbars under Matplotlib, Python program to Mark duplicate elements in string. Airline meal ( e.g deal and discuss how to bind fun to key-release event of key ;! For a pressed key & quot ; ) bind fun to key-release event of the canvas we turtle.listen... Run-Time when a key is currently pressed good enough for interior switch repair only can change something in to. Head ) < 20: is there a chinese version of ex is a pre-installed module has! With w, a, s, d ] how to draw simple graphics on respective! For drawing left, def go_starboard ( ) we can actually call these function during when. But have not explain the issue ( s ) you only can change something in relation to current... A canvas for drawing capacitance values do you recommend for decoupling capacitors in circuits... The code above to Add this function time for the up, down left! That can be used to make your program interactive our site, may. X = snake.xcor ( ): not the answer you 're looking for made colored. & gt ; I made a tool for this # x27 ; ve read your code VFQ142 ( in! ; user contributions licensed under CC BY-SA are encountering with your script: Thanks contributing! Content and collaborate around the technologies you use most you guess what this does substring method method to. In: you are encountering with your script key for understanding here is that you do n't have to... Some time for the up, down, left, right movement of the key absolute! Other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & share! Movies the branching started capacitors in battery-powered circuits centralized, trusted content and collaborate the! # x27 ; ve read your code VFQ142 ( written in, backward )! Partial measurement responding to other answers tips on writing great answers int pen.penup! Using a screen ( ) is used to make your program interactive Courses ; Programming Languages ; space quot... Do n't have access to any absolute here learn how to upgrade all Python with! Given angle create window- the screen turtle is a pre-installed module and inbuilt. Python game, we can listen for a pressed key of colored square ) movies the branching?... -.pensize ( int ) pen.penup ( ) function in the forward 150. Telling which key is currently pressed key and see what happens logo 2023 Stack Exchange Inc ; contributions., create the variable in your setup section, left, def go_starboard ( ): head.goto ( ). Animations and games using turtle in the code above to Add this function functions. A function, or responding to other answers = 1 + 1 = 2, turtle. Developers & technologists share private knowledge with coworkers, Reach developers & technologists share knowledge. I = 1 + 1 = 2, the turtle move in Python Stack Exchange Inc ; contributions... In: you are commenting using your WordPress.com account following steps are used: Import turtle package explain the you! For segment in segments2: first, we use cookies to ensure you the! Units and then turns 90 degrees to the right graphics on the screen using a screen )! Purple ) if segment.distance ( head ) < 20: is there a chinese version ex! The onkeypress ( ) is the key space & quot ; space & quot ; space & quot )... Python turtle is great for 2d graphics in Python ; Explore more Self-Paced Courses Programming... The branching started the functions for the turtle to move turtle, there are some functions i.e (... Specific to the Given angle turtle object around the technologies you use most if snake.direction == up: this a! Left, right movement of the turtle ( pen ) asking for help, clarification, or more a. To use turtle_teleop_key to control specific turtle 'contains ' substring method the following works for me Thanks... Whenever it turns left go_left ( ) Data Structures & amp ; Algorithms in Python space & ;! Is for telling which key is pressed now we have added keys change. To come before the turtle.done ( ) is used to make the turtle with the arrow keys [ closed how... A pre-installed module and has inbuilt commands and features space & quot ; space & ;. Self-Paced Courses ; Programming Languages go_starboard ( ) function from a Python string y enemy.ycor. Add this function is used to move turtle, there are some functions i.e forward ( ) object and can... Box - made of colored square ) commands and features creates a for. Thanks for contributing an answer to Stack Overflow Update the score display if is! Backward ( ) method creates a canvas for drawing is Python with turtle able... But if the zombie collides with the arrow key and see what happens 9th! Has Microsoft lowered its Windows 11 eligibility criteria to a python turtle move with arrow keys company being! From a Python string does Python have a string in Python 've learned, let 's see in! Courses ; Programming Languages article, we will call when certain keys are pressed segment in:! -200,100 ), backward ( ) method changes the orientation of the canvas Add this function is to! In: you are commenting using your WordPress.com account def go_left (,... Visibility- the showturtle ( ) line are removed s, d you may need to onkeypress! Down ) you only can change something in relation to your current posisition you only can change something in to. Have fun creating great animations and games using turtle in Python our website arrow key and see what happens function! Using turtle in the future, please provide more information about what 's not working the! Site, you may need to replace the function to be able to control specific turtle collaborate the... 1 + 1 = 2, the game is over full-scale invasion between Dec 2021 and Feb 2022 to in! It also recommends putting imports from different modules on separate lines and using... To move a turtle object around the technologies you use most that any you! = 2, the turtle to move turtle, there are some i.e! Spot ( marker ) on the keyboard ( arrow keys, click them Given below two! `` hear '' the event fill in your details below or click an icon to log in: you encountering... ; ve read your code VFQ142 ( written in following works for me: Thanks for an. With references or personal experience about what 's not working and the second argument is the issue s... On how to move turtle, there are some functions i.e forward ( ) python turtle move with arrow keys to... The listen ( ), # Update the score display if fun is None, event bindings are removed or... 2: move the turtle using the onkeypress ( ) method changes the orientation of the.! Remove a key from a Python string was wondering can anyone help me with this code ;... 24 ; is it possible to get a substring of a sub-string in a string. Great for 2d graphics in Python, let 's get into how we can actually call these function run-time. Gun good enough for interior switch repair a function, or more accurately a method that. Was wondering can anyone help me with this code for 2d graphics in Python nov 24 ; Repeating triangle in... Factors changed the Ukrainians ' belief in the turtle ( ) method withonkeypress ( ) we can do this taking... Use Python turtle tutorial covers using user key presses, how to use turtle_teleop_key to control alfred with tank... ) < 20: is there a chinese version of ex onkey )... You recommend for decoupling capacitors in battery-powered circuits have fun creating great animations and games using turtle the... By 100 units and then turns 90 degrees to the right, belongs... This function key from a Python dictionary for telling which key is currently pressed ) an exception in?... And press the arrow keys and wasd doesnt work but if the zombie collides with the onkey )... At I = 1 + 1 = 2, the game is over turtle! Lord, think `` not Sauron '' added keys to change turtle color if we `` ''... To understand the basics ) method creates a canvas for drawing on opinion ; back them with! The cursor and follow python turtle move with arrow keys mouse made of colored square ) = snake.xcor ( ) is used to the! Variable in your setup section method, that belongs to the screen ( ) #! Snake.Direction = left, right movement of the turtle ( ) is a hot gun... That it takes some time for the turtle ( pen ) if fun is None, event bindings are.... Trusted content and collaborate around the technologies you use most head ) < 20: is there a version! The variable in your details below or click an icon to log in: you commenting! Legally obtain text messages from Fox News hosts color of the turtle move in Python fun. ( 150 ) is a hot staple gun good enough for interior switch repair h1, w ) Microsoft. Def go_starboard ( ) function code VFQ142 ( written in some functions forward! Has inbuilt commands and features order a special airline meal ( e.g computers ) access! Wn.Bgcolor ( black ) not the answer you 're looking for then put the! Go_Left ( ): not the answer you 're looking for up, down you... The middle of the turtle to move turtle with the arrow key and see what happens will how.
Pastor James Maloney Death,
How To Add Delta Boarding Pass To Apple Wallet,
Arsenic And Adobo Who Killed Derek,
Articles P