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
rusak2 [61]
3 years ago
9

What did I do wrong? May you please correct it for me...I was also looking on how to delay when it prints. Like when it prints a

sentence I want it to wait about 2 seconds.
Here's the code:

print("\nWelcome to the impossible quiz!\n")

name = input("What's your name before we get started? ")

print("Nice to meet you, "+ name)

print("\nThe rules are very simple, get the answer right and you get 10 points. You only have one chance to get the answer right, get it wrong and you'll lose 3 points! ")

input("\nReady?\n")

user_score = 0

print("First question: Do slugs have four noses?")
if answer = input('Give "F" for False or "T" for True: ')

if answer == "T":
print("Correct, you've gained 10 points!")
user_score += 10

elif answer == "F":
print("Incorrect, you've lost 3 points!")
user_score += -3

Computers and Technology
1 answer:
inessss [21]3 years ago
4 0

Answer:

print("\nWelcome to the impossible quiz!\n")

name = input("What's your name before we get started? ")

print("Nice to meet you, "+ name)

print("\nThe rules are very simple, get the answer right and you get 10 points. You only have one chance to get the answer right, get it wrong and you'll lose 3 points! ")

input("\nReady?\n")

user_score = 0

print("First question: Do slugs have four noses?")

answer = input('Give "F" for False or "T" for True: ')

if answer == "T":

time.sleep(2)

print("Correct, you've gained 10 points!")

user_score += 10

elif answer == "F":

time.sleep(2)

print("Incorrect, you've lost 3 points!")

user_score += -3

Explanation:

Please check the answer. However, if before answer was wrong, and we need to use time.sleep(2) for delaying printing.

You might be interested in
Power point 2016 which chart element provides the boundaries of the graphic?
SVEN [57.7K]
D. (chart elemments) - correct answer
8 0
4 years ago
Create a while loop to try making a video game turn based battle.
elena-14-01-66 [18.8K]

import random

monster_health = 20

player_health = 20

while player_health >0 and monster_health>0:

   player_choice = input("Do you wish to attack, heal, or do magic? (type attack, heal, or magic) ")

   if player_choice == "attack":

       damage = random.randint(1,6)

       monster_health -= damage

       print("You attack the monster for",damage,"points of health. The monster has",monster_health,"points of health")

   elif player_choice == "heal":

       heal = random.randint(1,6)

       player_health += heal

       if player_health>20:

           player_health = 20

       print("You heal for",heal,"points of health. Your health is now at",player_health)

   elif player_choice == "magic":

       total = 0

       for x in range(2):

           total += random.randint(1,6)

       monster_health -= total

       print("You attack the monster for",total,"points of health. The monster has",monster_health,"points of health")

   if player_health < 1 or monster_health <1:

       break

   monster_damage = random.randint(1,6)

   player_health -= monster_damage

   print("The monster attacks your for",monster_damage,"points of health. You have",player_health,"points of health remaining.")

if player_health < 1:

   print("You died! Better luck next time!")

elif monster_health < 1:

   print("You defeated the monster! Great job!")

I wrote my code in python 3.8. Best of luck.

5 0
3 years ago
You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in
baherus [9]

Answer:

The answer to this question can be given as:

Statement:

number = int(line.strip())

Explanation:

In the above statement, we declare an integer variable number accept the integer value from the file that name is line. In this line, we use the strip() function. This function returns a duplicate string with both starting and tracking characters removed (based on the string parameter passed). The strip() function removes characters from both sides (left and right) based on the parameter(a string defining the collection of characters to be removed).

7 0
3 years ago
Nathan notices that the words of the quotation are too close to the borders.
Airida [17]

Answer:

c. options

Explanation:

4 0
3 years ago
Read 2 more answers
How do you site this page??
pickupchik [31]
You take the URL of this page and give credit to this page under the "worked Cited" section in your homework page.
3 0
4 years ago
Other questions:
  • Can you think of a shortcut for calculating the network addresses of consecutive /30 subnets?
    9·1 answer
  • Is there a policy on Bainly about using notes from previous class sessions with definitions gained from googling them at the tim
    10·1 answer
  • The university computer lab’s director keeps track of lab usage, as measured by the number of students using the lab. This funct
    11·1 answer
  • Given the following code fragment and the input value of 4.0, what output is generated?
    8·1 answer
  • Which type of computer network ensures high security
    10·1 answer
  • For local patterns that change quickly, these methods are preferred 1. data driven 2. model drive 3. trend and seasonality drive
    10·1 answer
  • What is node ? Briefly explain with diagram<br><br>​
    8·1 answer
  • Which tool ia used to create the world wide web?
    15·1 answer
  • CAN SOMEONE PLEASE HELP ME WRITE AN INTRODUCTION ??? COMMENT FOR TOPIC
    11·1 answer
  • Write pseudo code that performs the following: Ask a user to enter a number. If the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!