Taking Dictionary as Input|Dictionary in Python|Python Tutorial for Beginners in Hindi

preview_player
Показать описание
Taking Dictionary as Input|Dictionary in Python|Python Tutorial for Beginners in Hindi
This video is part of python tutorial for beginners in hindi.In this video,i have explained how to take dictionary key-value pairs as input.By taking dynamic inputs,we are making our dictionary dynamic.
you will learn:-
1) Taking Dictionary as Input

source code :-

About Python Tutorial:- python for beginners-Go from Zero to Hero in python.This tutorial includes python programming videos from basics to advanced

More tutorials:-

About codeyug :-
Codeyug provides tutorials for building your programming skills.Here,you will learn various programming languages,computer science,web development with free of cost.

SHARE | SUBSCRIBE | LIKE
-- - - - - - - - - - - - - - - - - -Thanks for watching this video - - - - - - - - - - - - - - - - - -- -
Our social links:-
creator:-
$ -shantanu kejkar -$

#python #python3 #programming #codeyug #tutorial #beginners #coding
Рекомендации по теме
Комментарии
Автор

# dict taking input 🔣:

students = {}
n = int(input("Enter the no of students: "))
for i in range(n):
student_name = input("Enter name : ")
marks = float(input("Enter marks : "))
students[student_name] = marks
print(students)


# dict taking input 🔣:

students = {}
#n = int(input("Enter the no of students: "))
while True:
student_name = input("Enter name : ")
marks = float(input("Enter marks : "))
students[student_name] = marks
ans = input("you wanna quit (yes/no) ? : ")
ans=ans.upper( )

if ans == "YES":
break

print(students)

KaranSinghD-yjep
visit shbcf.ru