No products in the cart.

Write a program to accept values …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a program to accept values from a user in a tuple add a tuple to it and display it's elements one by one . Also display it's maximum and minimum value.
  • 1 answers

Preeti Dabral 3 years, 4 months ago

t=tuple( )

n=int(input("enter any no.:"))

for i in range(n):

a=input("enter number:")

t+=(a,)

print(t)

for i in t:

print(i)

print(max(t))

print(min(t))

Explanation: first we have created a tuple by accepting values from the user .and we display it's elements one after the another also it will display the minimum and maximum value

http://mycbseguide.com/examin8/

Related Questions

What is mean by buffering in file handling?
  • 1 answers
What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App