Repository navigation
Expand file tree
/
Copy pathinput.py
More file actions
48 lines (38 loc) · 1.58 KB
/
Copy pathinput.py
File metadata and controls
48 lines (38 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# name = input("Enter your name: ")
# print(f"welcome {name} to the pyhton tutorial series")
# a = input("enter first number:")
# b = input ("enter second number:")
# # print(f"sum of {a} & {b} is : {a+b}") # value nhii dega ku ki ye by default string read kr rha hai
# print(f"sum of {a} & {b} is : {int(a)+int(b)}")
# Assisgment - 2.1
# write a program to input student name and marks of 3 students
# print name and percentage
# print("percentage calucaltor")
# student_name = input("enter your name ")
# science_marks = int (input("enter science marks"))
# math_marks = int(input("enter math marks"))
# history_marks = int(input("enter history marks"))
# Total_marks = 300
# percentage = ((science_marks + math_marks + history_marks)/Total_marks ) *100
# print(f"{student_name} & percentage is {int(percentage)}%")
# # Assisgmnet 2.2
# name = input("enter your name")
# age = int(input("enter your age"))
# height = float(input("enter your height"))
# student_status = input("enter student status")
# dic = { name : input("enter your name"),
# age : int(input("enter your age")),
# height : float(input("enter your height")),
# student_status : input("enter student status")
# }
# print(dic)
# ye shi tarika hai pehle hi mujh edefine krna hoga dictionary
# intilizating a dictionary
user_data = {}
# input from user
user_data['name'] = input("enter your name:")
user_data['age'] = int(input("enter your age:"))
user_data['height'] = float(input("enter your height:"))
user_data['student_status'] = input("are you a student yes/no")
# print from user
print(user_data)