Programming Concepts
1. A program is being developed in Python to simulate box a card game
Throughout the game each player always has 100 cards. Each card displays a number.
Players take it in turns to swap one of their cards with another random card from a set of cards until a player has a run of five numbers in sequence within their 100 cards.
Figure 14 shows part of the program that will get a player to enter the position of a card to swap.
Figure 14
position = int(input("Enter card position: "))
Extend the program in Figure 14. Your answer must be written in Python.
The program should keep getting the user to enter the card position until they enter a card position that is between 1 and 100 inclusive.
You should use indentation as appropriate, meaningful variable name(s) and Python syntax in your answer.
Ai এর মাধ্যমে
১০ লক্ষ+ প্রশ্ন ডাটাবেজ
প্র্যাকটিস এর মাধ্যমে নিজেকে তৈরি করে ফেলো
উত্তর দিবে তোমার বই থেকে ও তোমার মত করে।
সারা দেশের শিক্ষার্থীদের মধ্যে নিজের অবস্থান যাচাই
No related questions found