Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noob question
#1
Hi I'm just starting out to learn to code in Python. I'm a total noob. I'm learning using video tutorials.
At the end of each section in the tutorials there is a short quiz.
There is one question in the last quiz I took I was hoping someone here could help clarify.

The questions is:
Which condition evaluates to a true statement?

x = 5 < 7
x = 7 < 5
x = 7 > 5
x = 5 > 7



The correct answer is x = 7 > 5
But I don't understand why it couldn't also be x = 5 < 7

Thanks Huh
Reply
#2
I assume they mean the part to the right of the equals sign evaluates to such (and then is assigned to x).

You could always ask the python interpreter what it thinks:

>>> 7 > 5
True
>>> 5 < 7
True
Looks like it agrees with you.
Reply
#3
(Aug-18-2020, 09:11 PM)bowlofred Wrote:
>>> 7 > 5
True
>>> 5 < 7
True
Looks like it agrees with you.

That's what I thought.
But apparently not.
You can select only one of the four choices.
If I choose x = 5 < 7 I get "this answer is incorrect"
The correct answer is x = 7 > 5

Weird...
Reply
#4
Then the quiz is incorrect. Do you have a link?
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#5
(Aug-18-2020, 09:50 PM)DeaD_EyE Wrote: Then the quiz is incorrect. Do you have a link?

It's a course on LinkedIn Learning, so I'm guessing you'll need a LinkedIn account to access it.

Course title: Python Essential Training
Instructor: Bill Weinman

It's the 4th question in the quiz at the end of chapter 3
https://www.linkedin.com/learning/python...u=56746073
Reply
#6
I think those questions are sloppy.

It says there's no difference between single- and double-quoted strings. I know what they mean, but that's wrong enough it shouldn't be a quiz question. "Hi'ya" and 'Hi'ya' are not the same.

"Accuracy is the true value of a calculation." Huh? I would say accuracy is the measure of how well the answer represents the true value. The way it's phrased seems very non-standard to me.

And then in the one you've already posted, it asks about "conditions" and then shows you four "equations", none of which evaluate to anything. I don't see any reason that "7 > 5" is to be preferred over "5 < 7". Both evaluate to True.
Reply
#7
(Aug-18-2020, 10:35 PM)bowlofred Wrote: I think those questions are sloppy.

Hmmm... okay, I'll just ignore it : )
Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Function not scriptable: Noob question kaega2 3 1,194 Aug-21-2022, 04:37 PM
Last Post: kaega2
  Noob question about lists adifrank 4 2,896 Nov-19-2020, 03:26 AM
Last Post: adifrank
  Noob question: why is shapesize() not working for my turtle adifrank 8 5,808 Sep-09-2020, 11:13 PM
Last Post: adifrank
  Noob Question: Sample Data csn113 1 2,187 Feb-18-2019, 06:35 PM
Last Post: micseydel
  Noob question on Mac python3, pydoc3 JamesNJ 0 2,316 Oct-08-2018, 04:26 AM
Last Post: JamesNJ
  Maya Python Noob Question Iurii_Ledin 2 3,301 Jun-08-2018, 09:09 PM
Last Post: Iurii_Ledin
  Noob question about python and Maxplus Strator 0 2,645 May-16-2017, 05:07 PM
Last Post: Strator
  a question from a noob kompressano 5 4,634 Mar-13-2017, 04:06 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020