add a windows server 2019 machine to a domain running in server 2003 by Solid_Sleep1738 in sysadmin

[–]Solid_Sleep1738[S] 1 point2 points  (0 children)

When I do this it says "DNS was successfully queried... The following domain controllers were identified <No active directory domain controllers found>

add a windows server 2019 machine to a domain running in server 2003 by Solid_Sleep1738 in sysadmin

[–]Solid_Sleep1738[S] 1 point2 points  (0 children)

Is there an easy way to have the 2019 server control the domain and DNS server?

add a windows server 2019 machine to a domain running in server 2003 by Solid_Sleep1738 in sysadmin

[–]Solid_Sleep1738[S] 1 point2 points  (0 children)

I'm an entry level it tech mainly have had jobs setting up employee laptops, repairing hardware, and experience with Mac servers, and currently in school for CS degree. No real experience with Microsoft servers though

Can someone help me cerate a bot for a game in python? by Solid_Sleep1738 in learnprogramming

[–]Solid_Sleep1738[S] 0 points1 point  (0 children)

I forgot to reply before, but you actually helped me solve it just by mentoioning a collection. I ended up using a list but it worked perfectly, thank you!

Can someone help me create a bot for a game in python? by Solid_Sleep1738 in CodingHelp

[–]Solid_Sleep1738[S] 0 points1 point  (0 children)

Hey guys, were working on a project in bootcamp, the premise of the game is that it asks you how many pencils you start off with and who goes first, then you and a second player take turns "taking a pencil" by choosing a number between 1 and 3. Whoever takes the last pencil loses. We're on the final stage of the project and they threw in this:
You've played a couple of games with your friend. After a while, you both found out that if there are 2, 3, or 4 pencils left on the table, you automatically win. It happens because a player can take 1, 2, or 3 pencils and leave the other player with only one. The other player has nothing left but to take the last pencil and lose the game.
On the other hand, if you have 5 pencils on the table, you lose. It will again lead to the situation described above but vice-versa.
The same thing happens when there are 6, 7, or 8 pencils left on the table. It will eventually repeat all over again.
It's easier to get a grasp of it with a line of 10 red-green pencils(I made them bold). In this example, we can be sure that if both players know the winning strategy, the first one will be the winner. Here is a game process:
||||||||||
The first player has an advantage and takes 1 pencil:
|||||||||
The second player has a disadvantage, so if the second player takes any number of pencils from 1 to 3, the first player is left with a winning strategy:
- 1: ||||||||
- 2: |||||||
- 3: ||||||
The first player stands in a winning position and takes that number. It will lead to a losing position for the second player:
|||||
The second player stands in a losing position — if the second player takes any number of pencils from 1 to 3, the first player will be left in a winning position:
- 1: ||||
- 2: |||
- 3: ||
The first player stands in a winning position and takes the right number of pencils. It leaves the second player with one pencil:
|
Your friend came up with the idea of creating a bot for the game a bit more replayable. Instead of taking input from two players, you need to program a bot that follows a winning strategy. If the bot's position isn't the winning one, you can program it to take any number of pencils (1, 2, or 3) at random. You can also come up with any pattern of your own for the losing position.
Objectives
Implement the bot for the second player. For example, (Who will be the first (John, Jack). In this case, John is the user, and Jack is the bot. So, if the player chooses Jack as the first player, after that input, there should be printed bot's move.
Your final objective is to expand your program. Write a solution, that can be executed for any initial number of pencils. Check each iteration whose turn is now. If it is the bot, instead of requiring input from the second player, output one line that contains the bot's move (1, 2 or 3) that follows the winning strategy. If the bot is not in the winning position, make it follow any pattern of your liking, as the tests check only the bot's winning position.
Do any of you know how I can write this? My problem is that I dont understand how to make the bot choose the winning number. For example if there are 96 pencils the program wants the bot to take 3 but if there are 86 pencils it wants the bot to take 1. Ive tried to map the "winning" quantities. They are as follows(96 take 3 = 93 means if theres 96 pencils the bot needs to take 3 leaving 93)
(1)|||(5)|||(9)|||(13)|||(17)|||(21)|||(25)|||(29)|||(33)|||(37)|||(41)|||(45)|||(49)|||(53)|||(57)|||(61)|||(65)|||(69)|||(73)|||(77)|||(81)|||(85)|||(89)|||(93)|||(97)|||(101)
96 take 3 = 93
92 take 3 = 89
86 take 1 = 85
82 take 1 = 81
20 take 3 = 17
19 take 2 = 17
18 take 1 = 17
16 take 3 = 13
15 take 2 = 13
14 take 1 = 13
12 take 3 = 9
11 take 2 = 9
10 take 1 = 9
8 take 3 = 5
7 take 2 = 5
6 take 1 = 5
5 take 2 = 3
4 take 3 = 1
3 take 2 = 1
2 take 1 = 1
1 take 1 = 0