Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    10
    ReputationRep:
    Hey, Could someone please help me out with python ??
    so I've made a menu using the def function.
    I have two options that the user can choose from.
    What i want to do is when the user picks each option they need to be presented with a different set of questions.
    How do i do this? I am supposed to use nested if statements.
    thankyou
    • TSR Support Team
    Online

    21
    ReputationRep:
    TSR Support Team
    I don't use python but in vb.net then it would be (hopefully this is enough to convert it to python)
    If button1.click then
    form2.load() <-- only if the questions are on form 2
    me.hide()
    elseif button2.click then
    form3.load()
    me.hide()
    end if

    or alternatively instead of loading new forms you could do msgbox("the question") to display the questions.
    Hopefully this is helpful. I generally find something like this in another language helps me to work it out in vb.net
    • Thread Starter
    Offline

    10
    ReputationRep:
    (Original post by Lemur14)
    I don't use python but in vb.net then it would be (hopefully this is enough to convert it to python)
    If button1.click then
    form2.load() <-- only if the questions are on form 2
    me.hide()
    elseif button2.click then
    form3.load()
    me.hide()
    end if

    or alternatively instead of loading new forms you could do msgbox("the question" to display the questions.
    Hopefully this is helpful. I generally find something like this in another language helps me to work it out in vb.net

    Yes thankyouu so much!
    I've finally figured it out
    ')
    • TSR Support Team
    Online

    21
    ReputationRep:
    TSR Support Team
    (Original post by bluepearl7)
    Yes thankyouu so much!
    I've finally figured it out
    '
    np the more you practise programming the better you get at guessing in my experience
 
 
 
Poll
Do you agree with the PM's proposal to cut tuition fees for some courses?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.