-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path04_input.py
More file actions
23 lines (19 loc) · 1.26 KB
/
Copy path04_input.py
File metadata and controls
23 lines (19 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#======================================================================================
# INPUT() FUNCTION
#--------------------------------------------------------------------------------------
# print()-Display something to users
# input()-Get something from users
# The input() function is a built-in python function that stops your program to get user input
#======================================================================================
#--------------------------------------------------------------------------------------
# Dynamic values(data entered by the user that can vary each time the program runs)
#--------------------------------------------------------------------------------------
name = input("Enter Your Name:") # Dynamic Value
#----------------------------------------------------------------------------------------------------
# Hard coded value(fixed piece of data written directly into your code that never changes at runtime)
#----------------------------------------------------------------------------------------------------
country = "India" # Hard Coded Value
print(name, "comes from", country)
# Input() makes your program interactive
country = input("Where are you from:")
print(name, "comes from", country)