generated from mwc/lab_names
	I changed the greeting to allow the user to say their name. It will then greet them by their name. I also allowed the code to find the area of a circle when the user gives the radius.
Checkpoint 1: The difference between a value and a name is that a value is the thing that it is and a name refers to seomthing else. Values can be floats, ints, strings, or booleans. In real life you would call someone by their name, not by describing them so you would call someone by their name, not value. Variables are important in coding because they allow you to not have to repeat lines of code over and over again. Once you make a variable you can call it multiple times and it will remember the code associated with it.
This commit is contained in:
		@@ -4,3 +4,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
print("This program will calculate the area of a circle.")
 | 
					print("This program will calculate the area of a circle.")
 | 
				
			||||||
radius = float(input("What is the circle's radius? "))
 | 
					radius = float(input("What is the circle's radius? "))
 | 
				
			||||||
 | 
					pi = 3.141592653
 | 
				
			||||||
 | 
					area = pi*radius**2
 | 
				
			||||||
 | 
					print(area)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,6 @@
 | 
				
			|||||||
# ------------
 | 
					# ------------
 | 
				
			||||||
# By MWC contributors
 | 
					# By MWC contributors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my_name ="Chris"
 | 
					my_name =input("What is your name? ")
 | 
				
			||||||
greeting = "Hello, " + my_name
 | 
					greeting = "Hello, " + my_name
 | 
				
			||||||
print(greeting)
 | 
					print(greeting)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								poetry.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								poetry.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand.
 | 
				
			||||||
 | 
					package = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[metadata]
 | 
				
			||||||
 | 
					lock-version = "2.1"
 | 
				
			||||||
 | 
					python-versions = ">=3.10,<4.0"
 | 
				
			||||||
 | 
					content-hash = "7b8fc01b274bd807fb00372bbc8e138330f15ae7978ed61e180f3b17ec076725"
 | 
				
			||||||
		Reference in New Issue
	
	Block a user