Bottom Page

• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
 help cant do random number nonzzo Programmer named Tim Posts: 6 Threads: 4 Joined: Mar 2019 Reputation: 0 Likes received: 0 #1 Mar-28-2019, 07:08 PM ```import random while True: navn = input("Navn?: ") alder = input("alder?: ") køn = input("kvinde eller mand?: ") randnummer = random.randint(1,11) print ("før du kan komme vider skal du gætte et tal mellem 1 og 10") while numbwriten ?= randnummer: numbwriten = input("hvad gætter du?") if numbwriten == randnummer: print ("tillykke") ``` Yoriz Posts: 1,253 Threads: 28 Joined: Sep 2016 Reputation: 121 Likes received: 283 #2 Mar-28-2019, 07:33 PM `?=` should be `!=` for not equal « Next Oldest | Next Newest »

Top Page

 Possibly Related Threads... Thread Author Replies Views Last Post Generate only one random number for many tries Bhavika 2 126 Mar-29-2020, 12:12 PM Last Post: Bhavika Finding MINIMUM number in a random list is not working Mona 5 355 Nov-18-2019, 07:27 PM Last Post: ThomasL same number everytime when using random.randint summeringpainting 5 898 Aug-23-2019, 11:01 AM Last Post: Malt problems with random number/string PrasadPython 3 482 Mar-01-2019, 06:00 PM Last Post: ichabod801 random number anasa 2 802 Nov-26-2018, 08:56 PM Last Post: Excelsiscelia Random Number sorting Siddharth1989 2 829 Aug-08-2018, 11:53 AM Last Post: ichabod801 Guess Random Number Why i m not able to enter input Nithya Thiyagarajan 6 3,895 Jan-07-2018, 04:26 AM Last Post: squenson Random number selection stumunro 4 1,288 Aug-31-2017, 02:12 PM Last Post: stumunro

Forum Jump:

Users browsing this thread: 1 Guest(s)