1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
almond37 [142]
3 years ago
6

This is a quick and easy program that will let you practice the basics of the switch statement. You will ask the user to enter a

fabric code found on a pair of pants. The fabric code is in the form of . Read the code and then inform the user what material the pants are made out of. Valid user entries are: - 'C' for Cotton - 'L' for Liner - 'P' for Polyester The number is the thread count of the material and must be between 100 and 1000 inclusive. If either the code or the count is invalid print the indicated invalid statement. Prompt: Enter the fabric code found on your pants: Possible Output: Your pants contain cotton with a thread count of 300. Air dry to avoid shrinking! Your pants contain linen with a thread count of 400. They are cool but wrinkle easily! Your pants contain polyester with a thread count of 1000. They are stain resistant! Invalid fabric code. Please run the program again. Notes and Hints: 1) You must use a Switch statement for this 2) You must accept the upper or lowercase version of the letters 3) This is not a trivial excercise, Hand write the algorithm BEFORE you start coding!!
Computers and Technology
1 answer:
Nikolay [14]3 years ago
5 0

Answer:

Explanation:

oof okay

You might be interested in
What is a way to minimize technical problems with your computer
Gala2k [10]
Buy or get new software that protects ur pc, such as a "fixmestix" or just download new software or use a disc 
4 0
3 years ago
A friend has a CD of one of your favorite artists and has offered to let you copy it.
creativ13 [48]
No; copyright laws protect this artist's rights and I need to purchase the CD if I want it.  

This is due to copyrights being applied at the time of fixation.  In other words, as soon as the words or lyrics have been placed on paper, recorded or put in a computer the ARTIST is protected.
6 0
3 years ago
What do I do if someone wants to be my friend, and I don’t know who the person is online?
prohojiy [21]
Tell someone you're close to, and see what advice they have. It's best to ignore the person until then.
8 0
2 years ago
Read 2 more answers
Why is it important to think about the programming language to use?
Sloan [31]
In think is C or B in my opinion
6 0
3 years ago
This assignment is to code a simple hangman game. The game should choose a random word out of a list of words that are coded int
pshichka [43]

Answer:

Programming language not stated.

I'll use python for this question

Explanation:

import random

# library that we use in order to choose

# on random words from a list of words

words = ['rain, 'computer', 'science', 'program, 'python', 'mathematics', 'player', 'condition','reverse', 'water', 'board', 'geeks','learn','school','days','scholar','collar','flood','house','flies']

# Function will choose one random word from this list of words

word = random.choice(words)

print("Guess the word")

guesses = ''"

# 5 turns

turns = 5

while turns > 0:

# counts the number of times a user fails

failed = 0

# all characters from the input word taking one at a time.

for char in word:

# comparing that character with the character in guesses

if char in guesses:

print(char)

else:

print("_")

# for every failure 1 will be incremented in failure

failed += 1

if failed == 0:

# user will win the game if failure is 0 and 'You Win' will be given as output

print("You Win")

# this print the correct word

print("The word is: ", word)

break

# if user has input the wrong alphabet then it will ask user to enter another alphabet

guess = input("guess a character:")

# every input character will be stored in guesses

guesses += guess

# check input with the character in word

if guess not in word:

turns -= 1

# if the character doesn’t match the word then “Wrong” will be given as output

print("Wrong")

# this will print the number of turns left for the user

print("You have", + turns, 'more guesses')

if turns == 0:

print("You Loose")

7 0
2 years ago
Other questions:
  • What is the fundamental problem producers and consumers face?
    12·1 answer
  • 안녕하세요! 한국어도 여기서 사용 가능한지 궁금합니다.
    6·2 answers
  • What three conditions must be satisfied in order to solve the critical section problem?
    13·1 answer
  • Which is an example of Raw Input?
    11·1 answer
  • What two pieces of information would you need in order to measure the masses of stars in an eclipsing binary system?
    9·1 answer
  • How we can earn from an app​
    12·1 answer
  • Write a Java statement to create an object LG of class TvSets
    11·1 answer
  • Consider the following instructions for a game element: Move Forward If not at end, move forward Else stop This is an example of
    10·1 answer
  • What is the name of the arm that is attached to the read/write head?
    13·1 answer
  • How can the two independent clauses below be combined to form a correct complete sentence? Check all that apply.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!