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
aivan3 [116]
3 years ago
11

Plz help code practice for python

Computers and Technology
2 answers:
jekas [21]3 years ago
7 0

Answer:

grade = int(input())

grade = "Freshman" if grade == 9 else "Sophomore" if grade == 10 else "Junior" if grade == 11 else "Senior" if grade == 12 else "Not in High School"

print(grade)

Explanation:

One liner if-elif-elif-else statement. Tested it, works just fine.

laila [671]3 years ago
6 0

Answer:umm

Explanation:

You might be interested in
One critique of determining the effectiveness of the psychodynamic perspective is that its theories are too vague to test. t/f
Feliz [49]
TRUE

Psychodynamic theories are usually too vague to allow a clear scientific test. Modest support for central psychodynamic hypotheses has been provided by Empirical studies. Critics have in the past disputed very many aspects of psychoanalysis including whether it is indeed a science or not. However much this is so, psychoanalysis is a great idea in personality that should never be overlooked.






3 0
4 years ago
Read 2 more answers
I don’t understand the double8 coding problem. It is Java
sergeinik [125]
Ask someone who knows about this stuff this is weird I would say look it up maybe
7 0
3 years ago
if you want to present slide to fellow student or co-workers, wich productivity software should you use to create them?
Reika [66]
Microsoft PowerPoint
6 0
3 years ago
Write a Python program that uses function(s) for writing to and reading from a file:
swat32

import random

def random_number_file_writer(nums):

   f = open("random.txt", "w")

   i = 0

   while i < nums:

       f.write(str(random.randint(1,500))+"\n")

       i += 1

   f.close()

def random_number_file_reader():

   f = open("random.txt", "r")

   total = 0

   count = 0

   for x in f.readlines():

       total += int(x)

       count += 1

   print("The total of the numbers is "+str(total))

   print("The number of random numbers read from the file is "+str(count))

def main():

   random_number_file_writer(int(input("How many random numbers do you want to generate? ")))

   random_number_file_reader()

main()

I hope this helps!

6 0
3 years ago
In python how do you write for prime factors
olasank [31]

Answer:

The while loop is used and the factors of the integer are computed by using the modulus operator and checking if the remainder of the number divided by i is 0. 3. Then the factors of the integer are then again checked if the factor is prime or not.

Explanation:

google

4 0
3 years ago
Other questions:
  • The Fully Meets rating should be assigned when the spelling suggestion matches query intent
    11·1 answer
  • In which of the following scenarios would you use the Redo function?
    9·1 answer
  • Each webpage is assigned a(n) ______, an address that identifies the location of the page on the Internet.
    6·1 answer
  • What allow you to write alphas on a computer keyboard
    10·1 answer
  • Explain what the hazard detection unit is doing during the 5th cycle of execution. Which registers are being compared? List all
    6·1 answer
  • Input 10 integers and display the following:
    6·1 answer
  • Write a generator function named count_seq that doesn't take any parameters and generates a sequence that starts like this: 2, 1
    7·1 answer
  • Question #5
    15·2 answers
  • Help asap !!!<br>which component of cpu controls the overall operation of computer..​
    9·1 answer
  • Anyone knows the answer for 6.1.4 Happy Birthday! codehs
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!