Unladen Swallow
Apr-07-2020, 07:10 AM
Unladen Swallow
Apr-16-2020, 06:51 AM Lux Wrote: Well, the line seems to be why it's printing all the numbers- not sure if it's supposed to do that.
Minister of Silly Walks
Apr-16-2020, 12:09 PM (This post was last modified: Apr-25-2020, 04:38 PM by .) caseyfloyd6 Wrote: Removed spam contentIs this supposed to help with the question?
Need help on the forum? Visit
For learning more and more about python, visit
Unladen Swallow
Apr-18-2020, 04:40 AM vis1999 Wrote: please, solve my problem, when i put the term in output block(7,2,bob,10,2)again it ask enter a num and not show the resultBro plss help me for 3.3 assignment
Unladen Swallow
Apr-19-2020, 04:10 PM (This post was last modified: Apr-19-2020, 04:15 PM by .) baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please.
This is the assignment:
5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. Enter 7, 2, bob, 10, and 4 and match the output below.
This is my code:
This is the Desired output:
Invalid input
Maximum is 10
Minimum is 2
This is my output:
7 ← Mismatch
2
bob
Please, enter only numbers.
10
4
Maximum 10
Minimum 2
I need help please.
Minister of Silly Walks
Apr-20-2020, 09:12 AM check out this code
largest = None
smallest = None
while True:
inp = raw_input("Enter a number: ")
if inp == "done" : break
try:
num = int(inp)
except:
print ("Invalid input")
if smallest is None:
smallest = num
elif num < smallest:
smallest = num
elif num > largest:
largest = num
continue
print ("Maximum is", largest)
print ("Minimum is", smallest) First of all, this is the HOMEWORK SECTION, you aren't SUPPOSED TO WRITE CODE FOR OTHERS.
And, second, even if you write code, please use proper code tags
Need help on the forum? Visit
For learning more and more about python, visit
Unladen Swallow
Apr-25-2020, 04:04 PM baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please.
This is the assignment:
5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. Enter 7, 2, bob, 10, and 4 and match the output below.
This is my code:
This is the Desired output:
Invalid input
Maximum is 10
Minimum is 2
This is my output:
7 ← Mismatch
2
bob
Please, enter only numbers.
10
4
Maximum 10
Minimum 2
I need help please.
TRY THIS CODE:
largest = None
smallest = None
while True:
try:
num = input("Enter a number: ")
if num == "done":
break
num = int(num)
if largest is None or largest < num:
largest = num
elif smallest is None or smallest > num:
smallest = num
except ValueError:
print("Invalid input")
continue
print ("Maximum is", largest)
print ("Minimum is", smallest)
Minister of Silly Walks
May-31-2020, 06:11 AM vis1999 Wrote: please, solve my problem, when i put the term in output block(7,2,bob,10,2)again it ask enter a num and not show the resultTo ask another question, start a new thread , DON'T POST IN ANOTHER THREAD WRITTEN BY ANOTHER USER
gracePython3 Wrote: if smallest is None:
smallest = num
elif num < smallest:
smallest = num
if largest is None:
largest=num
elif num > largest:
largest = num
then it works.Please don't post you solution, this is the homework section. And also, if you post codes in future, please use proper code tags
Saikumar Wrote: vis1999 Wrote: please, solve my problem, when i put the term in output block(7,2,bob,10,2)again it ask enter a num and not show the resultBro plss help me for 3.3 assignmentYou need help in an assignment, post another thread, specifying all needs and requirements
Helious10 Wrote: baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please.
This is the assignment:
5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. Enter 7, 2, bob, 10, and 4 and match the output below.
This is my code:
This is the Desired output:
Invalid input
Maximum is 10
Minimum is 2
This is my output:
7 ← Mismatch
2
bob
Please, enter only numbers.
10
4
Maximum 10
Minimum 2
I need help please.
TRY THIS CODE:
largest = None
smallest = None
while True:
try:
num = input("Enter a number: ")
if num == "done":
break
num = int(num)
if largest is None or largest < num:
largest = num
elif smallest is None or smallest > num:
smallest = num
except ValueError:
print("Invalid input")
continue
print ("Maximum is", largest)
print ("Minimum is", smallest)Please don't post you solution, this is the homework section. And also, if you post codes in future, please use proper code tags
sanjaykumar11 Wrote: I have upload python assignment 5.2 full solution in the video
Please, start another thread for this. It would also be preferred if you didn't show this, as students need to solve assignments on their own
Need help on the forum? Visit
For learning more and more about python, visit
Unladen Swallow
.)
Minister of Silly Walks
Jun-29-2020, 02:17 AM (This post was last modified: Jun-29-2020, 02:18 AM by .) rafaelmoreno1 Wrote: hello cheakout man
That's very good, but please don't post unnecessary stuff on a thread when a person is asking a question. If you want to show this, post it probably in the board/bar section.
Need help on the forum? Visit
For learning more and more about python, visit |
|
| | | | |
| | | | 45,947 | Jan-23-2021, 06:27 AM : |
| | | | 13,167 | Oct-22-2020, 11:57 AM : |
| | | | 12,205 | Jul-15-2020, 04:54 PM : |
| | | | 5,161 | Jun-06-2020, 08:59 AM : |
| | | | 6,297 | May-02-2020, 01:34 AM : |
| | | | 31,981 | Apr-08-2020, 06:49 AM : |
| | | | 8,662 | Dec-23-2019, 08:41 PM : |
| | | | 8,647 | Oct-22-2019, 08:08 AM : |
| | | | 16,099 | Jan-17-2019, 07:34 AM : |
User Panel Messages
Announcements.
![python assignment 5.2 python assignment 5.2](https://python-forum.io/images/healt_python38.png)
Login to Python Forum
![](//2me.site/777/templates/cheerup/res/banner1.gif)
IMAGES
VIDEO
COMMENTS
Fork 5 5. [Coursera] Python for everybody 5.2 Assignment. Raw. 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try,except and put out an appropriate ...
I have been taking Coursera's course, Programming for Everybody with Python. But one of the assignment 5.2 on week 7 got my attention. The objective is to make the user enter some numbers and enter done, when he entered all the numbers he wanted. After that, the output should be the biggest number and smallest number he entered. Here is the ...
Hi guys, in this video I solved the assignment 5.2 of Coursera Python for Everybody. Hope you find it useful.If you're new, Subscribe! https://www.youtube....
python-for-everybody. /. wk5 - assignment 5.2.py. Cannot retrieve latest commit at this time. History. Code. 32 lines (25 loc) · 831 Bytes. 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers.
this contains all the answers to the quizes and asssignments for "Programming for Everybody (Getting Started with Python)" on Coursera by the University of Michigan. - Coursera---Programming-for-Everybody-Getting-Started-with-Python-/Week 7- Assignment 5.2 at master · Ritik2703/Coursera---Programming-for-Everybody-Getting-Started-with-Python-
Code link:https://drive.google.com/file/d/1HDYJ1BNgLPGk4P3sZRqcQvXuDNBuN1jK/view?usp=sharingCoursera: Python For Everybody Assignment 5.2 program solution | ...
Saved searches Use saved searches to filter your results more quickly
The assignment is. 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number.
Help with the assignment 5.2 in Python for everybody. Community Support (Archived) — Edward Lundqvist asked a question. March 8, 2021 at 6:45 AM. Help with the assignment 5.2 in Python for everybody. I need help with the assignment 5.2 in Python for everybody. Somebody that could help me?
The video is about the solution of the mentioned assignment of the python course named 'PYTHON FOR EVERYBODY' on coursera by Dr. Chuck
Activity: 5.2.3 The len function tells us how many items are in its argument. (functBuiltin_len) These functions can operate on any set of values, as we will see in later chapters. You should treat the names of built-in functions as reserved words (i.e., avoid using "max" as a variable name). 1. city_name = "Detroit".
CourseraProgramming for Everybody (Getting Started with Python)Week 5 Assignment 5.2 Question: 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it…
Joined: Oct 2017. Reputation: 1. #1. Oct-07-2017, 03:58 PM. Hey guys- I'm on my last assignment for Python and I need some expert assistance please. This is the assignment: 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers.
Subreddit for posting questions and asking for general advice about your python code. ... (Getting Started with Python) Week 7 Assignment 5.2 . Ques: Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters ...
An issue with Assignment 5.2 [Coursera Programming for Everybody] Even if my code matches desired output, it shows the code is incorrect. I spent all day trying to fix the issue but failed.
Fork 0. [Coursera] Python for everybody 5.2 Assignment. Raw. 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try,except and put out an appropriate ...
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.
Python Programming (COM 302) 17 Documents. Students shared 17 documents in this course. University Saint Leo University. Academic year: 2021/2022. ... COM 302 3.1 Case Study Assignment; COM 302 Case Study 2.1 Assignment; COM 302 Case Study 3.2 Assignment; Case Study 4.1 Assignment; Case Study 5.1 Assignment; Related documents.
The assignment goal is to create a program that gets numbers as input from the user and i need to send back the largest number and the smallest number
An Informal Introduction to Python — Python 3.12.4 documentation. 3. An Informal Introduction to Python ¶. In the following examples, input and output are distinguished by the presence or absence of prompts ( >>> and … ): to repeat the example, you must type everything after the prompt, when the prompt appears; lines that do not begin with ...
search () vs. match () ¶. Python offers different primitive operations based on regular expressions: re.match() checks for a match only at the beginning of the string. re.search() checks for a match anywhere in the string (this is what Perl does by default) re.fullmatch() checks for entire string to be a match.
The official dedicated python forum. (Oct-07-2017, 03:58 PM) baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please. This is the assignment: 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers.