Coursera: Python For Everybody Assignment 5.2 program solution | Assignment 5.2 Python for Everybody

preview_player
Показать описание
Coursera: Programming For Everybody Assignment 5.2 program solution Answer | Python for Everybody Assignment 5.2 program solution.

IF YOUR PROGRAM IS WORKING
BUY ME A COFFEE-

Hello friends,
In this video we discussed about Coursera programming for everybody Assignment 5.2 answer other way it's known as Python for everybody Exercise 5.2 Complete program
In this course Assignment (Exercise) are available in week 7 part. This is the last assignment of this course.

Thanks for watching!!

🔰 -:Programming for Everybody:- 🔰

Course - 1st
[ Python For Everybody ]

❇️ Python For Everybody ❇️

⚜️ Peer-Graded Assignment Solutions (week 2)
💡

1. Python For Everybody Chapter 1 Quiz Answers-

2. Python For Everybody Write Hello world in python

3. Python For Everybody Chapter 2 Quiz Answers-

💡

4. Python For Everybody Assignment 2.2 Solution-

💡

5. Python For Everybody Assignment 2.3 Solution-

💡

6. Python For Everybody Chapter 3 Quiz Answers-

💡

7. Python For Everybody Assignment 3.1 Solution-

💡

8. Python For Everybody Assignment 3.3 Solution-

💡

9. Python For Everybody Assignment Chapter 4 Quiz Answers-

💡

10. Python For Everybody Assignment 4.6 Solution-

💡

11. Python For Everybody Chapter 5 Quiz Answers-

💡

12. Python For Everybody Assignment 5.2 Solution-

💡

➖➖➖➖➖➖➖➖➖➖➖➖➖

💡💡Course 2nd💡💡

❇️[PYTHON DATA STRUCTURES]❇️

1. Python Data Structures Chapter 6 Quiz Answers-

💡

2. Python Data Structures Assignment 6.5 Solution-

3. Python Data Structures Chapter 7 Quiz Answers-

💡

4. Python Data Structures Assignment 7.1 Solution-

💡

5. Python Data Structures Assignment 7.2 Solution-
💡

6. Python Data Structures Assignment 8.4 Solution-
💡

7. Python Data Structures Assignment 8.5 Solution-
💡

8. Python Data Structures Assignment 9.4 Solution-
💡

9. Python Data Structures Assignment 10.2 Solution-
💡

Please Subscribe My Channel !!
Share The video || Like ✓ || Comment!!

#Python_for_everybody_assignment_5_2 #Coursera

#Assignment5.2_python_for_everybody_solution
Рекомендации по теме
Комментарии
Автор

this doesnt work for numbers under -1, i did something different and it worked, great video tho:

largest = None
smallest = None
while True:
num = input("Enter a number: ")
if num == "done" :
break
try:
numb= int(num)
except:
print('Invalid input')
continue
if largest is None:
largest = numb
elif numb > largest:
largest = numb
if smallest is None:
smallest = numb
elif numb < smallest:
smallest= numb

print("Maximum is", largest)
print("Minimum is", smallest)

josemarcuevabenavides
Автор

Thank you there was a small mistake in my code this helped me out
Others wgo are getting error
Please watch carefully
After the try block we have to use "numb" and not "num"
To differ this you can use any other variable except numb

aayushrajpurohit
Автор

will we die from the assignment first or the music first? let's see

edwinicq
Автор

It doesn't get a new value for 'largest' and 'smallest' here, always stays the value on the first lines, any idea why? Thx for the video anyway

MatheusI
Автор

Thanks a I struggled with it for 6 hours and broke my mouse.I just had to use try and except.Anyways thanks a lot bro.got a thought on how to solve the problem

jayakrishna
Автор

guyz the correct answer is ....
largest = None
smallest = None
while True:
num = raw_input("Enter a number: ")
if num == "done": break
try:
num = int(num)
if largest is None or largest < num: largest = num
if smallest is None or smallest > num: smallest = num
except:
print ("Invalid input")
continue
print ("Maximum is", largest)
print ("Minimum is", smallest)

pjahnavi
Автор

num=0
largest=-1
smallest=None
while True:
num=input("enter number")
if num == 'done':
break
try:
numb=int(num)
except:
print("Invalid input")
if smallest is None:
smallest = numb
elif numb < smallest:
smallest = numb
elif numb > largest:
largest = numb
print("Maximum is", largest)
print("Minimum is", smallest)

ghanshyamparmar
Автор

After all .... It got solved... Thank you

hustler
Автор

thank-uhh buddy, karte karte fatt gai thi nahi ho rha thaa....
bohot-bohot dhanyawaad

siddharttthh
Автор

i've a an error ..."inconsistent use of tabs and spaces in indentation" in line 14 . how to fix it ?

yunicoardianpradana
Автор

getting error in 13 line smallest = numb says numb is not defined

shaiveetamrakar
Автор

Num =0 you dont have to type this its not necesserary since you are putting values through input in num i did it without it and it gave same results . Btw can any one explain why it shows " you actually have to compute max and min" if you try to do it without 'None'?

ayeshaniyazshaikh
Автор

Question:

if smallest is None :
smallest = numb

Why are these 2 lines necessary to find smallest, when they are not necessary to find largest?

If these two lines were deleted, the code will not recognize the smallest value, and simply print "Minimum is None" at the end (meaning the elif for "smallest" wouldn't work). But the elif for "largest" works fine without them. Why is this?

ako
Автор

It showing output correct but it not grade successfully, it showing store grade error

dhanush-nusb
Автор

It says mismatch and my output is
Invalid input
Invalid input
Invalid input
Invalid input
Invalid input
Maximum is bob
Minimum is 10
Please help..???

SM-fbxu
Автор

Thank you so much it was really very helpful

Shaguftak
Автор

compiler shows bad input on 7 i checked twice every thing is good

_anmol-
Автор

my result is exactly the same as desired output... yet it says mismatch? dunno what's going on my output is:

Invalid input
Maximum is 10 ← Mismatch
Minimum is 2

desired output:

Invalid input
Maximum is 10
Minimum is 2

my code is:


largest = None
smallest = None
num = 0
total = 0
while True:
value = input("Enter a number: ")
if value == "done":
break
try:
flValue = int(value)
except:
print('Invalid input')
if flValue > largest:
largest = flValue
if smallest is None:
smallest = flValue
elif flValue < smallest:
smallest = flValue




print("Maximum is ", largest)
print("Minimum is ", smallest)

sebastianschumacher
Автор

Please Upload Solution Programming: Solving Problems with Software

vaibhavkalsait
Автор

largest ko -1 kyu assign karna pada aur None kyu nahi? Please explain :)

schavan
join shbcf.ru