A Day Computer Science Manzoor DL 17 due 2:30 PM

IMPORTANT MESSAGE
************************************************
FINAL TERM EXAMINE WILL BE TAKEN IN THREE PARTS BETWEEN (MAY 26 to 28)
PART 1: VOCABULARY TERMS
PART 2: PROGRAMMING CODES
Q1 . A set of instruction given to the computer is called:
Hardware
Software
Computer language
Computer tricks

Q2 . The programming languages that are close to human language are called:
Low level language
Machine language
High level language
Assembly language

Python Programming Question:
Write a program that prints a random number from 1 to 100.
Hint: Using randint () function

https://www.geeksforgeeks.org/python-randint-function/

Hints:

See code below, try changing
r1 = random.randint(0, 10)
to
r1 = random.randint(1, 100)

Code #1 :

filter_none
edit
play_arrow
brightness_4
# Python3 program explaining work
# of randint() function
 
# imports random module
import random
 
# Generates a random number between
# a given positive range
r1 = random.randint(0, 10)
print("Random number between 0 and 10 is % s" % (r1))
 


Code #1 :
filter_none
edit
play_arrow
brightness_4
# Python3 program explaining work
# of randint() function 
  
# imports random module
import random
  
# Generates a random number between
# a given positive range
r1 = random.randint(0, 10)
print("Random number between 0 and 10 is % s" % (r1))
  

Comments

Popular posts from this blog

Computer Science Manzoor Do Now Due 250 PM

Bday Math Pre-Calc M. Mui Pecentage increase/decrease do now Class: Jeopardy due 2:30 Pm

A Day English Due 2:30 PM DL-Do NowCareer Research- Ms.Casella