GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

What is the name of the covalent compound Si3Cl6?

What is the name of the covalent compound Si3Cl6?

Read Details

What will be the output of the following program? [assume ne…

What will be the output of the following program? [assume new lines appear where needed] for x in range(2, 6):  print(x) 

Read Details

What is returned by the following function? def check_value(…

What is returned by the following function? def check_value(x):   try:    if x > 0:       return “Positive”    elif x == 0:       return “Zero”    else:       return “Negative”   except:       return “—“result = check_value(“Hello”) print (result)

Read Details

What will be the output of the following program? b = “Hello…

What will be the output of the following program? b = “Hello, World!”print(b[2:5])    

Read Details

Write a Python program that acts as a very basic calculator….

Write a Python program that acts as a very basic calculator. Your program should: Ask the user for two numbers. Ask the user for an operation. (addion + or subtraction -).   Perform the chosen operation on the two numbers and print the result. Include a simple check to make sure only numbers are input. Your program should loop until both numbers entered are zero.  Hint: You will need a loop and a try/except!  Sample run: Enter first number (0 to exit): 10Enter second number (0 to exit): 5Enter operation (+, -,): +Result: 15.0——————————Enter first number (0 to exit): abcInvalid input. Please enter numbers.——————————Enter first number (0 to exit): 0Enter second number (0 to exit): 0Exiting calculator. Goodbye! You should be able to complete this in 17 lines of code or fewer. However, if you go over, no points will be deducted. You do not need to use functions unless you want to.  

Read Details

x = 30if x 20:          print(“Wow”)    else:         print(…

x = 30if x 20:          print(“Wow”)    else:         print(“Done”)  

Read Details

What is the output of the following code: b = “Hello, World!…

What is the output of the following code: b = “Hello, World!”print(b[:5])

Read Details

What will the following function print out?def greet(lang):…

What will the following function print out?def greet(lang): if lang == ‘es’: return ‘Hola’ elif lang == ‘fr’: return ‘Bonjour’ else: return ‘Hello’   print(greet(‘es’),’Michael’)

Read Details

Write a  program, that asks for a radius and then will calcu…

Write a  program, that asks for a radius and then will calculate the diameter, circumference, and area of a circle.  Diameter = 2r Circumference = 2πr Area = πr2 Your program should not crash. Your program should loop until a zero value for the radius is entered.

Read Details

A tech company asks: “How likely are you to recommend this s…

A tech company asks: “How likely are you to recommend this smartwatch to a friend?”Responses range from 0 (not at all likely) to 10 (extremely likely). What measurement scale is this?

Read Details

Posts pagination

Newer posts 1 … 35,766 35,767 35,768 35,769 35,770 … 90,769 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top