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