Python input and output exercises, arithmetic exercises, turtle preliminary exercises

Source: Internet
Author: User
Tags arithmetic

Print ("Hello world!! ")
Name=input ("What is your name?\n") where=input ("where is you now?\n") Age=input ("How is old is you ? \ n")Print("your name is {}". Format (name))Print("You live in {}". Format (where)Print("You is {} years old". Format (age))
A=input (" Please enter first number:") b=input (" Please enter a second number:") Sum1=float (a) +float (b)print(" sum of two numbers: {}". Format (SUM1))
 a=float (Input ( "  first side length:  "  )) b  =float (Input ( "   second side length:   "  ) c  =float (input ( "  third side length:   " )) p  = (a+b+c)/2s  = (p* (p-a) * (p-b) * (p-c)) **0.5print  (  Triangle has an area of {}   ". Format (s)) 
R=float (Input (" radius of circle:")) s=3.14*r*rprint("  The area of the circle is {}". Format (s))
Import turtleturtle.speed (turtle.circle)turtle.circle(()turtle.circle ( ) turtle.circle (40)
ImportTurtleturtle.begin_fill () Turtle.fillcolor ("Blue") Turtle.color ("Blue") Turtle.forward (200) Turtle.right (144) Turtle.forward (200) Turtle.right (144) Turtle.forward (200) Turtle.right (144) Turtle.forward (200) Turtle.right (144) Turtle.forward (200) Turtle.right (144) Turtle.end_fill ()

Python input and output exercises, arithmetic exercises, turtle preliminary exercises

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.